Reputation: 4421
I setup opentelemetry with autoconfiguration. Now what I see on Jaeger is series of spans orginazed under traces. So I can see spans like "http get some-external-service/path" which is fine.
What to do when I would like to see which part of my code was the invoker of the service?
Can I append that information somehow to the span?
As for reading this: https://opentelemetry.io/docs/languages/java/instrumentation/ I think I can do it when manually setting up traces and spans but that would be a huge amount of work and making the codebase unreadable.
is there any centralized way to do it ?
Upvotes: 0
Views: 72
Reputation: 221
if you are using Java agent you can use @WithSpan
, annotate methods invoking external services with @WithSpan
annotation which will create a span of the invoking method and another service span should be visible under this span. More Details on @WithSpan
here https://opentelemetry.io/docs/languages/java/automatic/annotations/
Upvotes: 1