Install
$ agentstack add skill-jabrena-cursor-rules-java-182-java-observability-metrics-micrometer ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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 verifyormvn clean verifyafter changes
When to use this skill
- Improve metrics
- Apply Micrometer
- Add metrics observability
- Refactor Micrometer instrumentation
Workflow
- 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.
- Select meter types and instrument code paths
Apply Counter/Timer/Gauge/DistributionSummary/LongTaskTimer where appropriate, ensuring consistent naming conventions and reusable tags.
- 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.
- 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).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jabrena
- Source: jabrena/cursor-rules-java
- License: Apache-2.0
- Homepage: https://jabrena.github.io/cursor-rules-java/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.