-
Notifications
You must be signed in to change notification settings - Fork 889
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 that Trace/Meter are associated with Instrumentation Scope #2276
Clarify that Trace/Meter are associated with Instrumentation Scope #2276
Conversation
de293ee
to
946afab
Compare
Overall LGTM - I'd like to get the opinion of maintainers though. cc @tedsuo |
Let's keep this open for at least one week. I want to make sure lots of folks see this. |
We should also mention this in the Maintainers and Spec SIG meetings next week. |
@tigrannajaryan I created an entry for the next week maintainer agenda meeting, and add this as a discussion point. I will not be there. |
@open-telemetry/specs-approvers I won't be able to attend the Maintainers meeting today. If you are in the meeting please ask maintainers to have a look / be aware of this change. |
@open-telemetry/specs-metrics-approvers @open-telemetry/specs-trace-approvers please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanding the definition of a field that was already declared stable such that it is now possible to lose the originally intended information contained in the field (by using a class name instead of the actual library name) breaks the field.
- This is breaking for receivers who depend on the instrumentation library name being contained in this field, with no way to recover this information
- Logger name will not always refer to the instrumentation library as this field was intended. Actually, it is extremely unlikely to refer to the instrumentation library and would rather refer to the thing being instrumented.
@dyladan to clarify, your position is that we should not make this change for Tracer/Meter name because it is a breaking change. You think that it is OK to assign a different meaning to the Logger name field, i.e. accept that it is not going to be consistent with Tracer/Meter name in its semantics. |
Contributes to open-telemetry#1215 Contributes to open-telemetry#2358 The topics has been discussed at length. This [PR](open-telemetry#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
Contributes to open-telemetry#1215 Contributes to open-telemetry#2358 The topics has been discussed at length. This [PR](open-telemetry#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
Contributes to #1215 Contributes to #2358 The topics has been discussed at length. This [PR](#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
This applies changes described in spec PR open-telemetry/opentelemetry-specification#2276 This is not a breaking change for OTLP. The wire format does not change. The change is done in a way that the transition can be handled gracefully for OTLP/JSON and for the generated code. See the comments for explanation on how to do it in the senders and receivers.
Spec change can be found in PR: open-telemetry/opentelemetry-specification#2276
Spec change can be found in PR: open-telemetry/opentelemetry-specification#2276
Spec change can be found in PR: open-telemetry/opentelemetry-specification#2276
OTEL-PHP at some point switched to using InstrumentationScope instead of InstrumentationLibrary everywhere, which incidentally satisfied the ["Fetch InstrumentationScope from ReadableSpan"](https://github.com/open-telemetry/opentelemetry-specification/blob/9abbdd39d0b35f635f833f072013431da419894e/specification/common/mapping-to-non-otlp.md#instrumentationscope) part of the spec (otel-php is still alpha so it seemed ok to not deprecate the instrumentation library and just remove it's use entirely) Related issues # open-telemetry/opentelemetry-php#705 Related [OTEP(s)](https://github.com/open-telemetry/oteps) # Don't think it was an OTEP but #2276 is where the push for the change originally came from I believe
This commit accomplishes two things simultaneously - adding support for InstrumentationScope everywhere, and also updating the OTLP proto to v0.18.0. The PR that introduced InstrumentationScope is [here](open-telemetry/opentelemetry-specification#2276) My best understanding (which is implemented in this PR) is that: - Our OTLP export requests should group by InstrumentationScope instead of InstrumentationLibrary - We must be able to support accessing the InstrumentationLibrary from anywhere a ReadableSpan is available, and that it should represent the `name` and `version` fields from the InstrumentationScope. - When creating a tracer, we create and store an InstrumentationScope rather than an InstrumentationLibrary. - Non-OTLP exporters must export both `otlp.scope.{name,version}` AND `otlp.library.{name,version}` tags for backwards compatibility. Some notes that may be interesting: - I chose to keep the original definition of `InstrumentationLibrary` around for now. - I chose to have `Span#instrumentation_library` and `SpanData#instrumentation_library` create and memoize an `InstrumentationLibrary` on-demand when someone asks for it (and marked the method as deprecated in the YARD docs). - I chose *not* to reference that deprecated helper when modifying the zipkin and jaeger exporters, for performance reasons.
This commit accomplishes two things simultaneously - adding support for InstrumentationScope everywhere, and also updating the OTLP proto to v0.18.0. The PR that introduced InstrumentationScope is [here](open-telemetry/opentelemetry-specification#2276) My best understanding (which is implemented in this PR) is that: - Our OTLP export requests should group by InstrumentationScope instead of InstrumentationLibrary - We must be able to support accessing the InstrumentationLibrary from anywhere a ReadableSpan is available, and that it should represent the `name` and `version` fields from the InstrumentationScope. - When creating a tracer, we create and store an InstrumentationScope rather than an InstrumentationLibrary. - Non-OTLP exporters must export both `otlp.scope.{name,version}` AND `otlp.library.{name,version}` tags for backwards compatibility. Some notes that may be interesting: - I chose to keep the original definition of `InstrumentationLibrary` around for now. - I chose to have `Span#instrumentation_library` and `SpanData#instrumentation_library` create and memoize an `InstrumentationLibrary` on-demand when someone asks for it (and marked the method as deprecated in the YARD docs). - I chose *not* to reference that deprecated helper when modifying the zipkin and jaeger exporters, for performance reasons.
…1345) * feat: support InstrumentationScope, and update OTLP proto to 0.18.0 This commit accomplishes two things simultaneously - adding support for InstrumentationScope everywhere, and also updating the OTLP proto to v0.18.0. The PR that introduced InstrumentationScope is [here](open-telemetry/opentelemetry-specification#2276) My best understanding (which is implemented in this PR) is that: - Our OTLP export requests should group by InstrumentationScope instead of InstrumentationLibrary - We must be able to support accessing the InstrumentationLibrary from anywhere a ReadableSpan is available, and that it should represent the `name` and `version` fields from the InstrumentationScope. - When creating a tracer, we create and store an InstrumentationScope rather than an InstrumentationLibrary. - Non-OTLP exporters must export both `otlp.scope.{name,version}` AND `otlp.library.{name,version}` tags for backwards compatibility. Some notes that may be interesting: - I chose to keep the original definition of `InstrumentationLibrary` around for now. - I chose to have `Span#instrumentation_library` and `SpanData#instrumentation_library` create and memoize an `InstrumentationLibrary` on-demand when someone asks for it (and marked the method as deprecated in the YARD docs). - I chose *not* to reference that deprecated helper when modifying the zipkin and jaeger exporters, for performance reasons. * Update sdk/test/opentelemetry/sdk/trace/span_test.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * Update sdk/lib/opentelemetry/sdk/trace/span_data.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * Update sdk/lib/opentelemetry/sdk/trace/span.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * fixup: use alias_method * fixup: add deprecation notice to InstrumentationLibrary * fixup: argh, use alias in class scope * Update sdk/lib/opentelemetry/sdk/trace/span.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * Update sdk/lib/opentelemetry/sdk/trace/span.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * Update sdk/lib/opentelemetry/sdk/trace/span_data.rb Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com> * fixup: update Rakefile to regenerate protos correctly It now checks out a specific tag, for starters. * bundle exec rake update_protobuf Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com>
…metry#2622) OTEL-PHP at some point switched to using InstrumentationScope instead of InstrumentationLibrary everywhere, which incidentally satisfied the ["Fetch InstrumentationScope from ReadableSpan"](https://github.com/open-telemetry/opentelemetry-specification/blob/9abbdd39d0b35f635f833f072013431da419894e/specification/common/mapping-to-non-otlp.md#instrumentationscope) part of the spec (otel-php is still alpha so it seemed ok to not deprecate the instrumentation library and just remove it's use entirely) Related issues # open-telemetry/opentelemetry-php#705 Related [OTEP(s)](https://github.com/open-telemetry/oteps) # Don't think it was an OTEP but open-telemetry#2276 is where the push for the change originally came from I believe
Contributes to open-telemetry/opentelemetry-specification#1215 Contributes to open-telemetry/opentelemetry-specification#2358 The topics has been discussed at length. This [PR](open-telemetry/opentelemetry-specification#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
OTEL-PHP at some point switched to using InstrumentationScope instead of InstrumentationLibrary everywhere, which incidentally satisfied the ["Fetch InstrumentationScope from ReadableSpan"](https://github.com/open-telemetry/opentelemetry-specification/blob/65624332cadac9990923f442e96a424c308e502c/specification/common/mapping-to-non-otlp.md#instrumentationscope) part of the spec (otel-php is still alpha so it seemed ok to not deprecate the instrumentation library and just remove it's use entirely) Related issues # open-telemetry/opentelemetry-php#705 Related [OTEP(s)](https://github.com/open-telemetry/oteps) # Don't think it was an OTEP but open-telemetry/opentelemetry-specification#2276 is where the push for the change originally came from I believe
Contributes to open-telemetry/opentelemetry-specification#1215 Contributes to open-telemetry/opentelemetry-specification#2358 The topics has been discussed at length. This [PR](open-telemetry/opentelemetry-specification#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
OTEL-PHP at some point switched to using InstrumentationScope instead of InstrumentationLibrary everywhere, which incidentally satisfied the ["Fetch InstrumentationScope from ReadableSpan"](https://github.com/open-telemetry/opentelemetry-specification/blob/9abbdd39d0b35f635f833f072013431da419894e/specification/common/mapping-to-non-otlp.md#instrumentationscope) part of the spec (otel-php is still alpha so it seemed ok to not deprecate the instrumentation library and just remove it's use entirely) Related issues # open-telemetry/opentelemetry-php#705 Related [OTEP(s)](https://github.com/open-telemetry/oteps) # Don't think it was an OTEP but open-telemetry/opentelemetry-specification#2276 is where the push for the change originally came from I believe
…pen-telemetry#2276) * Clarify that Trace/Meter are associated with Instrumentation Scope This is a slightly different take on open-telemetry#2203 Instead of renaming instrumentation library to instrumentation scope everywhere this PR suggests targetted editing of wording of the Trace/Meter obtaining API to allow not just instrumentation library but other instrumentation scopes to be used as a parameter. This change does not force renaming of API parameters and is not a breaking change. We consider it a clarification of usage to match the intent that we had for the "name" field. If this PR is accepted there will be a follow up PR that will suggest to rename InstrumentationLibrary* messages in OTLP proto to InstrumentationScope* message. Such a change will not be a breaking change for the OTLP wire format and is acceptable. If this PR is accepted we will also close open-telemetry#1236 since it will be no longer necessary. The logger name will be recorded as the instrumentation scope. This clarification will be a follow up PR that clarifies the behavior in https://github.com/open-telemetry/oteps/blob/main/text/logs/0150-logging-library-sdk.md
This is a slightly different take on #2203
Instead of renaming instrumentation library to instrumentation scope everywhere
this PR suggests targetted editing of wording of the Trace/Meter obtaining API
to allow not just instrumentation library but other instrumentation scopes to be
used as a parameter.
This change does not force renaming of API parameters and is not a breaking change.
We consider it a clarification of usage to match the intent that we had for the "name"
field.
If this PR is accepted there will be a follow up PR that will suggest to rename
InstrumentationLibrary* messages in OTLP proto to InstrumentationScope* message.
Such a change will not be a breaking change for the OTLP wire format and is acceptable.
If this PR is accepted we will also close #1236
since it will be no longer necessary. The logger name will be recorded as the
instrumentation scope, done in a separate PR that clarifies the behavior in https://github.com/open-telemetry/oteps/blob/main/text/logs/0150-logging-library-sdk.md
Resolves #2307