Skip to content

test: validate Micrometer vanilla compatibility#2121

Merged
zeitlinger merged 2 commits into
prometheus:mainfrom
zeitlinger:validation/typed-descriptor-micrometer-2094
May 22, 2026
Merged

test: validate Micrometer vanilla compatibility#2121
zeitlinger merged 2 commits into
prometheus:mainfrom
zeitlinger:validation/typed-descriptor-micrometer-2094

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented May 18, 2026

Draft validation PR for the unmodified Micrometer compatibility story.

This intentionally does not depend on #2114. Vanilla Micrometer does not use
the typed descriptor API and does not implement the #1800 registration metadata
hooks, so this PR validates the patch-compatible path independently of typed
descriptors.

This validates upstream micrometer-metrics/micrometer@main against:

Local validation:

  • mise run lint
  • MICROMETER_DIR=/tmp/micrometer-compat-vanilla-2124 mise run micrometer:test

@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-2094 branch from 921c00b to 1f435ae Compare May 18, 2026 12:25
@zeitlinger zeitlinger changed the title test: validate typed descriptors with Micrometer compatibility test: validate Micrometer vanilla compatibility May 18, 2026
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-2094 branch 3 times, most recently from c61d03d to 8cdb60b Compare May 18, 2026 14:32
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-2094 branch from 8cdb60b to d2691eb Compare May 20, 2026 10:54
@zeitlinger zeitlinger marked this pull request as ready for review May 20, 2026 16:05
Comment thread .mise/lib/micrometer_compat.py Outdated
Co-authored-by: Jay DeLuca <[email protected]>
Signed-off-by: Gregor Zeitlinger <[email protected]>
@zeitlinger zeitlinger enabled auto-merge (squash) May 22, 2026 07:08
@zeitlinger zeitlinger merged commit db9999a into prometheus:main May 22, 2026
10 checks passed
@zeitlinger zeitlinger deleted the validation/typed-descriptor-micrometer-2094 branch May 22, 2026 07:16
zeitlinger added a commit that referenced this pull request Jun 1, 2026
Adds typed metric family descriptors and typed metadata support for the
model snapshots.

This is the typed-descriptor branch for downstreams that want to provide
registration-time metadata explicitly. The #1800
Collector/MultiCollector registration metadata hooks are already
optional via default methods, so unmodified downstreams should not need
this PR just to keep working.

This PR now also deprecates the fragmented registration metadata API
(`getPrometheusName()`, `getMetricType()`, `getLabelNames()`, and
`getMetadata()` plus the `MultiCollector` variants) in favor of
`getMetricFamilyDescriptor()` / `getMetricFamilyDescriptors()`. The
deprecated methods remain bridged by default implementations for
compatibility.

Related validation:

- #2121 validates unmodified Micrometer independently of #2114, against
`main` + #2124.
- #2123 validates a Micrometer branch that explicitly uses
`MetricFamilyDescriptor` to implement the existing registration metadata
hooks without invoking scrape/sample callbacks during registration.

---------

Signed-off-by: Gregor Zeitlinger <[email protected]>
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.

2 participants