Repository navigation
Conversation
d8526bf to
f8b52f2
Compare
Pull request dashboard statusWaiting on the author · refreshed 2026-11-15 08:34 UTC Respond to 1 review item (e.g. link a commit, explain why not, ask a follow-up):
Status above doesn't look right?
|
|
Maybe I'm missing something obvious here, but why do we need I'm assuming we can just do the following:
This approach should naturally still handle the two requirements:
|
| def _populate_counter_family( | ||
| registry: dict[str, PrometheusMetric], | ||
| per_metric_family_id: str, | ||
| def _resolve_prometheus_name( |
There was a problem hiding this comment.
I know that OTel defaults to Prometheus text format, but what about OpenMetrics? E.g. if I have counter foo and gauge foo, then OpenMetrics will have the following type lines:
# TYPE foo counter
# TYPE foo gauge
Description
Implements the OpenTelemetry Prometheus Metric Metadata conflict specification in
opentelemetry-exporter-prometheus:_resolve_prometheus_name) and accumulate data points across all instruments/scopes and queuedMetricsDatapayloads in_PendingMetricFamilybefore building eachprometheus_clientmetric family once per scrape with unified sorted label keys (""backfilled for missing labels).TYPEs (e.g.counterfoovsgaugefoo_total, orgaugevshistogram).HELP(description) andUNIT(unit) metadata, log a warning, and keep all data points when two metrics resolve to the same Prometheus metric name with conflicting descriptions or units.Fixes #3072
Type of change
How Has This Been Tested?
pytest exporter/opentelemetry-exporter-prometheus/tests(added unit tests for multi-scope/label-set grouping,HELPconflicts,UNITconflicts,TYPEconflicts acrosscounter/gaugeandgauge/histogram, and multiple queuedMetricsDataitems in a single scrape)ruff check/ruff format --check/pylintDoes This PR Require a Core Repo Change?