github/awesome-copilot / skills/spring-observability
spring-observability
VerifiedAdd and review observability in Spring Boot 3/4 apps: Actuator exposure and health probes, Micrometer metrics, Observation API, OpenTelemetry tracing and OTLP/Prometheus export, structured logging with correlation ids, and safe use of heapdump/threaddump. Use when instrumenting, monitoring or troubleshooting a Spring Boot service.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| references/actuator.md | markdown | 1.9 KB |
| references/dumps-and-diagnostics.md | markdown | 1.4 KB |
| references/logging.md | markdown | 1.7 KB |
| references/metrics.md | markdown | 2.0 KB |
| references/tracing-observation.md | markdown | 2.7 KB |
references/actuator.md
View on GitHub# Actuator
Dependency: `spring-boot-starter-actuator`.
## Exposure
- Web exposure defaults to `health` only (Boot 3/4). Allow-list explicitly: `management.endpoints.web.exposure.include=health,info,metrics,prometheus`.
- Disable the rest: `management.endpoints.access.default=none` then enable chosen ones (`management.endpoint.<id>.access=read-only`) on Boot 3.4+; older `management.endpoint.<id>.enabled` still works on 3.3 and earlier.
- Move to an internal port: `management.server.port=9090` (and `management.server.address`).
- Secure with Spring Security: see `spring-security` skill, `references/actuator-protection.md` in that skill.
- Info: `management.info.env.enabled=true`, `management.info.git.mode=simple`, `management.info.build` via the build plugin's `build-info` goal.
## Health
```yaml
management:
endpoint:
health:
show-details: when-authorized
roles: ACTUATOR_ADMIN
probes:
enabled: true
group:
readiness:
include: readinessState,db
liveness:
include: livenessState
```
- Probes (`/actuator/health/liveness`, `/readiness`) are enabled automatically on Kubernetes; enabling them elsewhere requires `probes.enabled=true` (Boot 4 enables them by default).
- Liveness must not depend on external systems (a failing DB must not restart the pod). Put DB, broker, etc. only in readiness if at all.
- Custom indicators: implement `HealthIndicator` (or `ReactiveHealthIndicator`); keep checks fast with timeouts.
- Graceful shutdown: `server.shutdown=graceful` and `spring.lifecycle.timeout-per-shutdown-phase=30s`.
## Other useful endpoints
`metrics`, `prometheus`, `loggers` (change levels at runtime; protect), `httpexchanges` (needs an `HttpExchangeRepository` bean), `scheduledtasks`, `caches`, `startup` (needs `BufferingApplicationStartup`). Treat `env`, `configprops`, `beans`, `mappings` as sensitive.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |