Skip to content

github/awesome-copilot / skills/spring-observability

spring-observability

Verified

Add 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.

FileKindSize
SKILL.mdskill md3.7 KB
references/actuator.mdmarkdown1.9 KB
references/dumps-and-diagnostics.mdmarkdown1.4 KB
references/logging.mdmarkdown1.7 KB
references/metrics.mdmarkdown2.0 KB
references/tracing-observation.mdmarkdown2.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.
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 implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
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 fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
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 alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall