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

Jun 1, 2026

@zeitlinger

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:


Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

@zeitlinger

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

@zeitlinger

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

@zeitlinger zeitlinger changed the titletest: validate Micrometer opt-in compatibility test: validate Micrometer typed-descriptor compatibility

Jun 3, 2026

jaydeluca

@zeitlinger

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

@zeitlinger zeitlinger deleted the validation/typed-descriptor-micrometer-opt-in branch

June 3, 2026 15:42

jaydeluca pushed a commit that referenced this pull request

Jun 4, 2026

@zeitlinger @jaydeluca

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:


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

Jun 4, 2026

@zeitlinger @jaydeluca

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:

That Micrometer branch provides MetricFamilyDescriptor metadata from the Prometheus registry without invoking scrape/sample callbacks during registration.

Local validation:


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 }})