Skip to content

MetricReader redesign #2917

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

Open
cijothomas opened this issue Apr 8, 2025 · 1 comment
Open

MetricReader redesign #2917

cijothomas opened this issue Apr 8, 2025 · 1 comment
Milestone

Comments

@cijothomas
Copy link
Member

MetricReader is an important aspect of the OTel Metric Specification. It is currently part of the public API in OTel Rust, though it is rarely required by end users to directly deal with MetricReaders. (100% of examples in the repo - no need of learning about MetricReader at all, as it is handled transparently)

The design of MetricReader has some challenges, especially in locking the Public API. Opening an issue to track improvements to the same.
Few items from top of mind:

  1. Consult OTel TC/GC to get an exemption from having to build Prometheus Exporter in this repo. While we already deprioritized it, we need an official blessing to remove it completely. The "pull" model used by Prometheus has some design challenges, and if we can avoid that, it'll make MetricReader design a lot more simple.
  2. See if there is any issue marking MetricReader under an experimental feature, allowing us to make breaking changes to it in the future. If this is feasible, this can unblock the stable release of Metrics Sdk.
  3. See if it is possible to mark 2 methods in MetricReader trait as experimental. (Collect, register_pipeline are the ones questionable.) This is a smaller version of 2 from above.

I don't expect any disruption to end-users as they don't really have a need to deal with MetricReader. Ability to write custom MetricExporters will be continued as is.

cc: @fraillt

@cijothomas cijothomas added this to the 0.30 milestone Apr 8, 2025
@fraillt
Copy link
Contributor

fraillt commented Apr 9, 2025

I would also like to emphasize that, with the current MetricReader design, we're not able to make certain changes to PushMetricExporter (e.g., adding set_resource(&mut self, ...)), which would help make all exporters more consistent.

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

No branches or pull requests

2 participants