-
Notifications
You must be signed in to change notification settings - Fork 888
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
Clarify SDK/MetricReader/MetricExporter boundaries #2129
Comments
Not related to temporality but I also don't understand the boundary between exporters and readers for shutdown. An exporter is always tied to one
There is an specific order needed for shutdown, though. For push exporters, you need to shutdown the reader (to flush the SDK) and then the shutdown the exporter. For pull exporters, you need to shutdown the exporter and then the reader, otherwise the exporter will call How does the MeterProvider infer the correct dependencies between all of the exporters and readers? |
MeterProvider doesn't see exporters, it only sees readers. Certain language implementation might choose to model Prometheus Exporter (or any pull exporter) as a MetricReader instead of MetricExporter, according to the SDK spec. |
Probably it could be simpler, I can give one possible way of implementing this (it's just one of the many possible ways of implementing this). Note that I only give the higher level ideas, there are many devils in the details (e.g. how to properly handle synchronization in a performant way). For push exporter:
For pull exporter:
|
What are you trying to achieve?
Clear design and terminology used. What is the "SDK", what are the components that an SDK communicates with, external boundaries, configurations, etc.
Additional context.
https:/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#temporality-override-rules
It is very unclear if an SDK "knows" about the MetricExporter interface or just about the "MetricReader" interface. From all the examples and text in the https:/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md it seems that the SDK only exposes one "external point" which is the MetricReader interface, and some implementations on the MetricReader may expose a "MetricExporter" interface. If that is the case the "SDK" never sees directly an Exporter and does not know about temporality from there. So the SDK cannot and should not resolve any temporality conflict.
The text was updated successfully, but these errors were encountered: