182-java-observability-metrics-micrometer
/182-java-observability-metrics-micrometer
Projektuje metryki w Javie przez Micrometer, z nazwami, tagami, limitem kardynalności i eksportem do Prometheus.
- Autor
- jabrena ↗
- Repozytorium
- cursor-rules-java ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Projektuje metryki w Javie przez Micrometer, z nazwami, tagami, limitem kardynalności i eksportem do Prometheus.
Oryginalny opis (EN)
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
Jak działa
- Constraints
- When to use this skill
- Workflow
- Reference
Podgląd SKILL.md
--- 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).
Pliki w paczce (2)
- SKILL.md 3 KB
- references/182-java-observability-metrics-micrometer.md 15 KB
Wersje
W bazie nie ma innych skilli o nazwie 182-java-observability-metrics-micrometer.
Migawka bazy z 13.11.2026 · wersja paczki ca26b71cde49 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100spring-observability
Dodaje i przegląda obserwowalność w aplikacjach Spring Boot 3 i 4: Actuator, metryki Micrometer, tracing OpenTelemetry i logi z identyfikatorami. - 100production-observability
Dodaje do aplikacji Spring Boot 3 Actuator, metryki Micrometer, śledzenie OpenTelemetry, logi strukturalne, health checks i alerty. - 100spring-boot-observability
Instrumentuje Spring Boot metrykami Micrometer, rozproszonym śledzeniem i logowaniem strukturalnym. - 100spring-actuator
Konfiguruje Spring Boot Actuator do monitoringu: health indicators, metryki Micrometer, integrację z Prometheus, własne endpointy, sondy Kubernetes i zabezpieczenie endpointów. - 100spring-boot-observability
Wspiera obserwowalność Spring Boot 4 z Actuator, Micrometer i OpenTelemetry: health checki, metryki własne, tracing, sondy Kubernetes i Cloud Run, logowanie i zabezpieczenie endpointów. - 100production-observability
Konfiguruje w Spring Boot 4 Actuator, Micrometer Observation i Tracing, eksport OTLP, logi strukturalne, health probes i alerty.