Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes the functionality of the Describe in prometheus exporter. #3342

Merged
merged 3 commits into from
Oct 18, 2022

Conversation

MadVikingGod
Copy link
Contributor

Describe is called when a collector first registered with prometheus. The intent is for the collector to enumerate all metrics that it might emit in later collects. See the prometheus' Custom Collector Documentation

Because this happens before our SDK is started and because our SDK can dynamically add metrics we should always return no metrics in a Describe() making our collector "unchecked". This PR makes that the case always.

Note: I think this was always the behavior in the new SDK, I don't think there is a way currently to have an SDK that has started, had metrics created, and registered the reader before the collector was registered with prometheus.

Fixes: #3291

@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Merging #3342 (d58eb16) into main (0963f59) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3342   +/-   ##
=====================================
  Coverage   77.8%   77.8%           
=====================================
  Files        164     164           
  Lines      11269   11267    -2     
=====================================
+ Hits        8768    8773    +5     
+ Misses      2303    2297    -6     
+ Partials     198     197    -1     
Impacted Files Coverage Δ
exporters/prometheus/exporter.go 81.4% <100.0%> (+1.4%) ⬆️
sdk/trace/batch_span_processor.go 81.9% <0.0%> (+1.7%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
exporters/prometheus/exporter.go Outdated Show resolved Hide resolved
@MrAlias MrAlias added this to the Metric v0.33.0 milestone Oct 17, 2022
@MrAlias MrAlias added bug Something isn't working area:metrics Part of OpenTelemetry Metrics pkg:exporter:prometheus Related to the Prometheus exporter package labels Oct 17, 2022
@MrAlias MrAlias merged commit 8b25cb2 into open-telemetry:main Oct 18, 2022
@MrAlias MrAlias mentioned this pull request Oct 19, 2022
@MadVikingGod MadVikingGod deleted the mvg/prom-describe branch February 21, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics bug Something isn't working pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Prometheus exporter reports reader not registered on startup
4 participants