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

Instrument ContextPropagationOperator to bridge lib/agent calls #4786

Merged
merged 8 commits into from
Dec 7, 2021

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Dec 2, 2021

Fixes reactor part of #4666

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

thx @lmolkova!

@mateuszrzeszutek @anuraaga would be great to get your thoughts on this. It's similar to the bridging we do on the OpenTelemetry API, but applied to a library instrumentation, which feels a little odd since typically I think of users using either library instrumentation -or- javaagent instrumentation, but not needing to use both. Maybe we could split out part of the reactor instrumentation module into an opentelemetry-extension-reactor module (similar to opentelemetry-extension-kotlin)?

public class ContextPropagationOperatorInstrumentation implements TypeInstrumentation {
@Override
public ElementMatcher<TypeDescription> typeMatcher() {
return named("application.io.opentelemetry.instrumentation.reactor.ContextPropagationOperator");
Copy link
Member

Choose a reason for hiding this comment

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

👍

@iNikem
Copy link
Contributor

iNikem commented Dec 3, 2021

which feels a little odd since typically I think of users using either library instrumentation -or- javaagent instrumentation, but not needing to use both.

Library itself can provide native/library instrumentation and then app developer brings in the agent. So this scenario is totally possible.

@mateuszrzeszutek
Copy link
Member

@mateuszrzeszutek @anuraaga would be great to get your thoughts on this. It's similar to the bridging we do on the OpenTelemetry API, but applied to a library instrumentation, which feels a little odd since typically I think of users using either library instrumentation -or- javaagent instrumentation, but not needing to use both.

I like this PR (and muzzle changes in #4797); perhaps we'll need to implement a similar bridge for the instrumentation-api in the future (other than the SpanKeys).

Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

👍
Thanks!

@trask trask merged commit 1995852 into open-telemetry:main Dec 7, 2021
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
…-telemetry#4786)

* Instrument ContextPropagationOperator to bridge lib/agent calls

* more tests

* clean up

* up

* lint

* more lint

* make runWithContext(Flux, ..) public

* lint
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.

None yet

4 participants