test: validate Micrometer typed-descriptor compatibility by zeitlinger · Pull Request #2123 · prometheus/client_java (original) (raw)
This was referenced
May 18, 2026
zeitlinger added a commit that referenced this pull request
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
MetricFamilyDescriptorto 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
Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com
zeitlinger changed the title
test: validate Micrometer opt-in compatibility test: validate Micrometer typed-descriptor compatibility
Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com
zeitlinger deleted the validation/typed-descriptor-micrometer-opt-in branch
jaydeluca pushed a commit that referenced this pull request
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
MetricFamilyDescriptorto 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: Jay DeLuca jaydeluca4@gmail.com
jaydeluca pushed a commit that referenced this pull request
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-in
That Micrometer branch provides MetricFamilyDescriptor metadata 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
Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com Signed-off-by: Jay DeLuca jaydeluca4@gmail.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
[ Show hidden characters]({{ revealButtonHref }})