Skip to content
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

Change default propagator in unconfigured API #930

Merged

Conversation

SergeyKanzhelev
Copy link
Member

Fixes #428
Alternative to #721

Changes

Default propagators in un-configured API must be no-op

specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved

OpenTelemetry API MUST use no-op propagators when used unconfigured. Context
propagation may be used for various telemetry signals - traces, metrics, logging
and more. Platforms such as ASP.NET may pre-configure out-of-the-box
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platforms such as ASP.NET

So .NET without ASP will work differently?

specification/context/api-propagators.md Outdated Show resolved Hide resolved
SergeyKanzhelev and others added 11 commits September 11, 2020 00:05
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
@carlosalberto
Copy link
Contributor

Overall LGTM. @open-telemetry/specs-approvers please review.

specified in [api-baggage.md](../baggage/api.md#serialization),
in order to provide propagation even in the presence of no-op
OpenTelemetry implementations.
The OpenTelemetry API should provide a way to obtain a propagator for each supported
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should, SHOULD or MUST?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'd prefer to have this as a MAY - we still need to decide whether TraceContext and Baggage Propagators will be in the API or in a separate package (the latter seemed to have slightly more approvals).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go with MUST. Not much use of API if there is no way to propagate context. @carlosalberto are you thinking of the long term vision where context just floats without the need for any API? Is it why you suggest "MAY"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with going with MUST, as this is what we have right now. Observe that we already specified that, at least for B3 and Jaeger, the Propagators ought to live in extension packages - so you may need to be concise and mention Baggage + TraceContext here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is about API surface. API must provide a means to help with extracting and injecting the context without the need to import special propagation package.

@carlosalberto
Copy link
Contributor

Ping @SergeyKanzhelev

@SergeyKanzhelev
Copy link
Member Author

Ping @SergeyKanzhelev

Is this ping for the comment from @Oberon00? What else is blocking? I see it's mostly blocked on number of reviews

That example does not fit the previous sentence. This here would be an example that recording of some signal is independent of propagation of cross-process correlation data for that signal.

@carlosalberto
Copy link
Contributor

@SergeyKanzhelev Mostly on @Oberon00's feedback ;) That being said, having it all resolved will hopefully motivate people to review this (and with @Oberon00's approval, we can technically merge this).

@carlosalberto
Copy link
Contributor

Ping @Oberon00 Please review again ;)

@arminru
Copy link
Member

arminru commented Sep 17, 2020

@SergeyKanzhelev Please rename the PR to "Change default propagator in unconfigured API" or something like that as the current title makes it sounds like this would just add a non-normative side note 🙂

supported `Propagator` type. Instrumentation libraries SHOULD call propagators
to extract and inject the context on all remote calls. Propagators, depending on
the language, MAY be set up using various dependency injection techniques or
available as global accessors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's meant by "global accessors"? Via global getters?
We could also more generically say "available as global properties on the API".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what's written is also generic enough. Let me know if this is blocking

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking (I already approved the PR) but a bit unclear to me.

specification/context/api-propagators.md Outdated Show resolved Hide resolved
specification/context/api-propagators.md Outdated Show resolved Hide resolved
SergeyKanzhelev and others added 2 commits September 17, 2020 09:28
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
@SergeyKanzhelev SergeyKanzhelev changed the title note on default propagators Change default propagator in unconfigured API Sep 17, 2020
@carlosalberto
Copy link
Contributor

We got enough approvals and in general there was agreement in a pair of Spec SIG calls. Will wait till early tomorrow to merge this ;)

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

Successfully merging this pull request may close these issues.

Default global propagators
6 participants