-
Notifications
You must be signed in to change notification settings - Fork 875
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
Annotations to inject and extract data with auto-instrumentation #9128
Comments
hi @SimoneGiusso!
check out #7787
Can you clarify this example? Wouldn't this capture the value of the method arg into the span attribute named |
Hello indeed For the second case, basically I would like to capture and use the data propagated within the trace. I think the only way to do it for now is with to use the OpenTelemetry API. In other words a way to let service 2 read the attribute service one sent with |
can you clarify, maybe with some psuedo code, how you would do this today with the OpenTelemetry API? |
moving this issue to the instrumentation repository... |
ping @SimoneGiusso
|
I think the only way to achieve context propagation with the OpenTelemetry API is as explained in the doc and use the What I would like to have is an API similar to OpenTracing to propagate the context:
|
@SimoneGiusso opentelemetry also has baggage api. // on client
Baggage baggage = Baggage.builder().put("key", "value").build();
try (Scope ignore = baggage.makeCurrent()) {
// call the server
}
// on server
String value = Baggage.current().getEntryValue("key"); |
@SimoneGiusso as discussed in open-telemetry/opentelemetry-java#5651, OTel baggage API is simply different from OpenTracing. It's not possible to 1:1 map OpenTracing to OTel, you have to restructure your code. |
I'll try to restructure the code since where I set the baggage I don't make the call to the server. |
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed automatically if there is no response from the author within 7 additional days from this comment. |
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Use manual instrumentation.
The text was updated successfully, but these errors were encountered: