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/dumps-and-diagnostics.md
View on GitHub# Heapdump, threaddump and runtime diagnosis
## Caveats
- `/actuator/heapdump` returns an HPROF file containing everything in memory: credentials, tokens, personal data. It also pauses the JVM and can be several GB.
- `/actuator/threaddump` reveals class names, thread states and sometimes parameters; it is a reconnaissance aid for attackers.
- Policy (shared with `java-diagnostics`): never expose either over public HTTP. The only exception is a temporary, user-consented window with authentication (admin role), TLS, and network restriction (separate management port, internal only), removed afterwards.
- Treat downloaded dumps as sensitive data; store encrypted, delete after analysis, never attach to public tickets.
- Boot 3.x/4.x can restrict access with `management.endpoint.heapdump.access=none` (Boot 3.4+); on older versions use `enabled=false`.
## Using them safely
```yaml
management:
endpoints:
web:
exposure:
include: health,info,threaddump # heapdump only when needed
endpoint:
threaddump:
access: read-only
```
Pair with a Spring Security chain restricting `EndpointRequest.to("heapdump","threaddump")` to an admin role (see `spring-security`).
## Going deeper
For JDK tools (`jcmd`, `jstack`, `jfr`, `jmap`, Eclipse MAT, JFR recording and analysis), use the `java-diagnostics` skill. Actuator metrics (`jvm.memory.used`, `jvm.gc.pause`, `hikaricp.connections.*`, `executor.*`) usually tell you which tool to reach for.
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: 321k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 321k | 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: 321k | 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: 321k | Updated | Claude CodeCodex | Verified | Install |