test: validate Micrometer typed-descriptor compatibility#2123
Merged
zeitlinger merged 3 commits intoJun 3, 2026
Merged
Conversation
This was referenced May 18, 2026
d7e2791 to
e10963e
Compare
a4c107c to
5b5bd33
Compare
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 <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1597c31 to
6b8a2f2
Compare
6b8a2f2 to
d522805
Compare
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
d522805 to
49efc39
Compare
jaydeluca
approved these changes
Jun 3, 2026
| # renovate: datasource=github-releases depName=micrometer-metrics/micrometer packageName=micrometer-metrics/micrometer | ||
| ref: v1.16.5 | ||
| - name: opt-in | ||
| repository: zeitlinger/micrometer |
Collaborator
There was a problem hiding this comment.
should we add a TODO to remove this at some point?
Member
Author
There was a problem hiding this comment.
Added a TODO plus follow-up issue #2182 so we can remove the temporary opt-in leg once Micrometer switches the typed-descriptor path to the default upstream behavior.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft validation PR for the downstream opt-in path.
Depends on #2114 for the typed descriptor implementation. This branch is stacked on the #2114 head, so once #2114 lands this PR should shrink to only the Micrometer opt-in compatibility tooling.
This validates Micrometer using the new descriptor API, defaulting to:
MICROMETER_REPOSITORY=zeitlinger/micrometerMICROMETER_REF=feat/prometheus-client-opt-inThat Micrometer branch provides
MetricFamilyDescriptormetadata from the Prometheus registry without invoking scrape/sample callbacks during registration.Local validation:
mise run lintMICROMETER_DIR=/tmp/micrometer-compat-optin mise run micrometer:test