-
Notifications
You must be signed in to change notification settings - Fork 828
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
Prometheus exporter: omit empty target_info metric #4177
Comments
Picking this up |
It seems this change doesn't need to be done in this repo @dashpole |
I believe we emit target_info even if there are no resource attributes: opentelemetry-js/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusSerializer.ts Lines 343 to 350 in f665499
|
I've updated the description to be more accurate, as otel_scope_info changes are not needed here. |
From the code below, the default resource is always used if no resource is specified (or an empty one is passed in) so we'd never have an empty resource. opentelemetry-js/packages/sdk-metrics/src/MeterProvider.ts Lines 47 to 57 in f5ef8de
If we choose not to emit target_info when the default resource is used, it could break the existing API, and I cannot predict the extent of the impact. |
Thanks for clarifying! |
Description
target_info should now only be generated when scope attributes and resource attributes are non-empty.
From open-telemetry/opentelemetry-specification#3660:
The text was updated successfully, but these errors were encountered: