-
Notifications
You must be signed in to change notification settings - Fork 926
Define attributes equality and make all fields as identifying for Tracer, Meter, Logger, EventLogger #4161
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
Conversation
SDK MUST be able to export all passed input.
@yurishkuro, you can take a look if this is inline with your #4146 (comment) |
PTAL @jmacd @tigrannajaryan |
@open-telemetry/specs-approvers This is a change in Stable docs. We need to decide if it is allowed. We are essentially saying that a behavior that was previously a user error (repeatedly obtain Tracer/Meter/Logger with the same name/version/schema_url and different attributes) is now valid. Can we treat this as a backward compatible, non-breaking enhancement that fits our stability guarantees? |
For reference, From mentioned issue description:
|
That is generally considered a backwards compatible change, because it relaxes the input requirements of the API. A step in the opposite direction (error where there wasn't one previously) would be a breaking change. |
Status update: |
Co-authored-by: Cijo Thomas <[email protected]>
I think this needs updates to some of the compatibility docs (at least prometheus). Currently, Prometheus adds scope name and scope version as labels to ensure we don't end up with duplicate timeseries, and we are able to put scope attributes in a separate TIL |
@dashpole, are you able to help with it? Do you think that it could be done in a separate PR? Should it be blocking this PR or can it be handled afterwards? Side note: Zipkin exporter does not export scope info at all (name, version, schemeURL, attributes). |
…cer, Meter, Logger, EventLogger (open-telemetry#4161)
…fields (open-telemetry#4244) Small follow up to open-telemetry#4161 ## Changes Updates the glossary to indicate that instrumentation scope's schema url and attributes are also identifying. I simplified the language a bit. * [x] Related issues open-telemetry#4160
Fixes #4223 Prototypes: - open-telemetry/opentelemetry-go#5947 - open-telemetry/opentelemetry-go#6770 - open-telemetry/opentelemetry-java#7356 - open-telemetry/opentelemetry-collector-contrib#40060 - open-telemetry/opentelemetry-collector-contrib#40004 ## Changes Currently (before this PR) [Prometheus and OpenMetrics Compatibility](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md) assumes that only scope name and scope version are identifying. However, with #4161 this is no longer true. Therefore, this PR updates the Prometheus and OpenMetrics Compatibility specification to add the scope name, version, schema URL, scope attributes to all metrics. This also removes the `otel_scope_info` as it looks that it won't be useful. See: #4223 (comment). This change important for Collector open-telemetry/opentelemetry-go#5846 (comment). It is also is necessary towards stabilization of OTel-Prom/OpenMetrics compatibility) and the Prometheus exporter. _Initially, I thought about [splitting it into a few PRs](#4223 (comment)). However, it looks like doing it in one PR would be a more complete approach (also there are not that many changes)._ --------- Co-authored-by: Jade Guiton <[email protected]> Co-authored-by: Carlos Alberto Cortez <[email protected]>
Fixes #4160 (prior art: #4146)
Python SDK, PHP SDK look to be compliant with the proposal. AFAIK these are the only languages which handle scope attributes in their stable releases.
Additional note:
I do not want to merge it before I prototype it in the Go SDK. However, I want to have some "acceptance" before writing the prototype.PoC in Go: open-telemetry/opentelemetry-go#5806Remarks: I do not feel competent to handle similar issue for instruments in metrics. Especially how to refine the duplicate instrument registration section. I decided to leave this section untouched.