182-java-observability-metrics-micrometer — Claude Code skill
182-java-observability-metrics-micrometer guides Java developers through Micrometer metrics design and validation. Use it when adding service measurements or revising existing instrumentation.
Apache-2.0 297 installs ★ 465 updated 2026-10-21
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a claude-codeWhat 182-java-observability-metrics-micrometer does
The skill helps map service indicators to metric names, units, tags, and meter types. It covers Counter, Timer, Gauge, DistributionSummary, and LongTaskTimer, along with histogram and percentile choices. Export guidance includes Actuator, Prometheus, and OpenTelemetry.
It stresses keeping tag values bounded: userId, UUIDs, raw URLs, and full exception messages can produce excessive time series and strain observability systems. After instrumentation changes, validate metric registration and values with tests, then run ./mvnw clean verify or mvn clean verify.
What it helps with
- choose a meter type for events, latency, or current state
- set stable metric names and low-cardinality tags
- configure histograms and percentiles for service metrics
- test that metrics register and report expected values
Example prompts for the agent
- Add Micrometer measurements for latency and error counts in this Java service.
- Review metric tags and remove values with unbounded cardinality.
- Configure histograms for the service metrics and validate them with tests.
How to install 182-java-observability-metrics-micrometer
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a claude-code2Manually: put the files in place
~/.claude/skills/182-java-observability-metrics-micrometer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/182-java-observability-metrics-micrometer/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a codex2Manually: put the files in place
.agents/skills/182-java-observability-metrics-micrometer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a cursor2Manually: put the files in place
.cursor/skills/182-java-observability-metrics-micrometer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth skills/182-java-observability-metrics-micrometer2Manually: put the files in place
.github/skills/182-java-observability-metrics-micrometer/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/182-java-observability-metrics-micrometerManually: put the files in place
.devin/skills/182-java-observability-metrics-micrometer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 182-java-observability-metrics-micrometer
How do I install 182-java-observability-metrics-micrometer in Claude Code?
Run npx skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer -a claude-code. The skill file is at ~/.claude/skills/182-java-observability-metrics-micrometer/SKILL.md.
What does 182-java-observability-metrics-micrometer do?
It guides Micrometer instrumentation in Java services, covering meter selection, naming, tags, cardinality control, and test validation.
Which metric tags should I avoid?
Avoid unbounded values such as userId, UUIDs, raw URLs, or full exception messages. They can cause time-series growth that harms observability systems.
Source text
SKILL.md · Apache-2.0
--- name: 182-java-observability-metrics-micrometer description: Use when you need to implement or improve Java metrics observability with Micrometer — including meter design, naming/tag conventions, cardinality control, timers/counters/gauges/distribution summaries, percentiles/histograms, Actuator/Prometheus integration, and metrics validation through tests. This should trigger for requests such as Improve metrics; Apply Micrometer; Add metrics observability; Refactor Micrometer instrumentation; Add Micrometer timers counters or gauges to Java services. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.19.0 --- # Java Metrics Observability with Micrometer Implement effective Java metrics instrumentation with Micrometer by defining meaningful service-level metrics, controlling cardinality, selecting the right meter type, and exposing production-ready telemetry for dashboards and alerting. **What is covered in this Skill?** - Metrics-first observability with Micrometer in Java applications - Meter selection: Counter, Timer, DistributionSummary, Gauge, LongTaskTimer - Naming and tagging conventions with low-cardinality dimensions - Cardinality and meter lifecycle safeguards to prevent time-series explosion - Histogram/percentile strategy and SLO-oriented metrics design - Integration guidance for Actuator + Prometheus/OpenTelemetry pipelines - Testing and verification of metrics registration and values **Scope:** Application-level metrics design and instrumentation quality for Java services, with emphasis on operationally useful and cost-efficient telemetry. ## Constraints Metrics instrumentation must be operationally safe, low-cardinality, and validated. Poor tag design or excessive meter creation can degrade observability systems and increase costs. - **LOW CARDINALITY FIRST**: Never tag metrics with unbounded values (userId, UUID, raw URL, full exception message) - **RIGHT METER TYPE**: Use Counter for monotonically increasing events, Timer for latency, Gauge for point-in-time state, and DistributionSummary for sampled values - **BEFORE APPLYING**: Read the reference for good/bad instrumentation examples and anti-patterns - **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after changes ## When to use this skill - Improve metrics - Apply Micrometer - Add metrics observability - Refactor Micrometer instrumentation - Add Micrometer timers counters or gauges to Java services ## Workflow 1. **Define measurement goals and meter contract** Identify key service indicators (throughput, latency, error ratio, saturation) and map each to stable metric names, units, and low-cardinality tags. 2. **Select meter types and instrument code paths** Apply Counter/Timer/Gauge/DistributionSummary/LongTaskTimer where appropriate, ensuring consistent naming conventions and reusable tags. 3. **Harden instrumentation for production** Control cardinality, avoid dynamic meter churn, configure histogram/percentile strategy only where needed, and align export settings with the telemetry backend. 4. **Validate and operationalize metrics** Verify metrics in tests and runtime endpoints, confirm expected labels/units, and ensure dashboards/alerts can consume the emitted series. ## Reference For detailed guidance, examples, and constraints, see [references/182-java-observability-metrics-micrometer.md](references/182-java-observability-metrics-micrometer.md).
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth