Skip to content

test: validate Micrometer typed-descriptor compatibility#2123

Merged
zeitlinger merged 3 commits into
prometheus:mainfrom
zeitlinger:validation/typed-descriptor-micrometer-opt-in
Jun 3, 2026
Merged

test: validate Micrometer typed-descriptor compatibility#2123
zeitlinger merged 3 commits into
prometheus:mainfrom
zeitlinger:validation/typed-descriptor-micrometer-opt-in

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger commented May 18, 2026

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/micrometer
  • MICROMETER_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 lint
  • MICROMETER_DIR=/tmp/micrometer-compat-optin mise run micrometer:test

@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-opt-in branch from d7e2791 to e10963e Compare May 18, 2026 13:52
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-opt-in branch 2 times, most recently from a4c107c to 5b5bd33 Compare June 1, 2026 13:48
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>
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-opt-in branch 2 times, most recently from 1597c31 to 6b8a2f2 Compare June 3, 2026 14:51
@zeitlinger zeitlinger marked this pull request as ready for review June 3, 2026 14:56
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-opt-in branch from 6b8a2f2 to d522805 Compare June 3, 2026 15:06
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger force-pushed the validation/typed-descriptor-micrometer-opt-in branch from d522805 to 49efc39 Compare June 3, 2026 15:10
@zeitlinger zeitlinger changed the title test: validate Micrometer opt-in compatibility test: validate Micrometer typed-descriptor compatibility Jun 3, 2026
Comment thread .github/workflows/micrometer-compatibility.yml Outdated
# renovate: datasource=github-releases depName=micrometer-metrics/micrometer packageName=micrometer-metrics/micrometer
ref: v1.16.5
- name: opt-in
repository: zeitlinger/micrometer
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a TODO to remove this at some point?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@zeitlinger zeitlinger merged commit 4f4e8a7 into prometheus:main Jun 3, 2026
15 of 16 checks passed
@zeitlinger zeitlinger deleted the validation/typed-descriptor-micrometer-opt-in branch June 3, 2026 15:42
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