Loading…
Loading…
371 карточек
What do Actuator and Micrometer provide, and what should be exposed in production?
нажми, чтобы перевернуть
/actuator/health, /metrics, /info, and /prometheus; Micrometer is a metrics facade (Timer, Counter, Gauge) exporting to Prometheus, OTLP, and other systems.Only /actuator/health is exposed by default. For Prometheus, configure management.endpoints.web.exposure.include=health,info,prometheus and add micrometer-registry-prometheus.
management.endpoint.health.show-details=when-authorized keeps database, disk, and custom HealthIndicator details private. Enable readiness/liveness probes with management.endpoint.health.probes.enabled=true.
Tag cardinality is the main risk: a
userIdtag on HTTP metrics can create millions of series and overwhelm Prometheus. Preferuri,status, andmethod.
Когда да
Use it from the first day: health for Kubernetes probes, metrics for alerts, and info for the build version.
Когда нет
Do not expose env, heapdump, or threaddump without authentication; they can leak configuration and data.
Совет на собеседовании
Mention high tag cardinality and that only /health is exposed by default.
Свайп вправо — знаю, влево — не знаю
