/182-java-observability-metrics-micrometer
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
$ npx -y skills add jabrena/plinth --skill 182-java-observability-metrics-micrometer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/182-java-observability-metrics-micrometer
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
182-java-observability-metrics-micrometer.SKILL.mdname: 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.18.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).
Read more
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.18.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).
Languages: Español · 中文 Help this project grow: Become a sponsor
Other skills on plinth.
- /001-commands-inventory
Use when you need to generate a checklist document with embedded commands inventory, following the embedded template exactly and producing INVENTORY-COMMANDS-JAVA.md in the project root. This should trigger for requests such as Create embedded commands inventory checklist;
Open skill - /002-agents-inventory
Use when you need to generate a checklist document with embedded agents inventory, following the embedded template exactly and producing INVENTORY-AGENTS-JAVA.md in the project root. This should trigger for requests such as Create embedded agents inventory checklist; Generate
Open skill - /003-skills-inventory
Use when you need to generate a checklist document with Java system prompts from skills.xml, following the embedded section template and producing INVENTORY-SKILLS-JAVA.md. This should trigger for requests such as Create Java system prompts checklist; Generate
Open skill - /004-commands-installation
Use when you need to install the embedded project commands into command directories (.github/commands, .claude/commands, .cursor/command, .codex/commands), selecting the destination interactively and copying the embedded command definitions from project assets. This should
Open skill - /005-agents-installation
Use when you need to install the embedded robot agents into .github/agents, .claude/agents, .cursor/agents, or .codex/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install
Open skill - /012-agile-epic
Guides the creation of agile epics with comprehensive definition including business value, success criteria, and breakdown into user stories. Use when the user wants to create an agile epic, define large bodies of work, break down features into user stories, or document
Open skill

