Skip to content

Introduce per-convention MeterConvention types and builder pattern#7369

Draft
shakuzen wants to merge 1 commit into
micrometer-metrics:mainfrom
shakuzen:sprinkle-conventions-on-it
Draft

Introduce per-convention MeterConvention types and builder pattern#7369
shakuzen wants to merge 1 commit into
micrometer-metrics:mainfrom
shakuzen:sprinkle-conventions-on-it

Conversation

@shakuzen

@shakuzen shakuzen commented Apr 1, 2026

Copy link
Copy Markdown
Member

Replace group interfaces (e.g., JvmMemoryMeterConventions) with specific per-convention interfaces (e.g., JvmMemoryUsedMeterConvention) following the proven ObservationConvention pattern. This resolves issues where the OTel variant extending the Micrometer variant made Spring Boot auto-configuration awkward, and where customizing a single meter required implementing the entire group interface.

Each binder now has a builder with per-convention setters and an openTelemetryConventions() convenience method. The binder merges extra tags itself so conventions stay purely semantic. Each specific interface provides a static of() factory for inline custom implementations.

Group interfaces and their implementations are deprecated in favor of the new per-convention types and builders.

Replace group interfaces (e.g., JvmMemoryMeterConventions) with specific
per-convention interfaces (e.g., JvmMemoryUsedMeterConvention) following
the proven ObservationConvention pattern. This resolves issues where the
OTel variant extending the Micrometer variant made Spring Boot
auto-configuration awkward, and where customizing a single meter
required implementing the entire group interface.

Each binder now has a builder with per-convention setters and an
openTelemetryConventions() convenience method. The binder merges extra
tags itself so conventions stay purely semantic. Each specific interface
provides a static of() factory for inline custom implementations.

Group interfaces and their implementations are deprecated in favor of
the new per-convention types and builders.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant