Replies: 1 comment
-
hi @ashwin-07! there was a bug in our docs, which has been fixed now. in particular,
should be
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello 👋
I exploring java agent for auto instrumentation. The agent generates traces for all events as it should, but I have a use case where I want to exclude most of the API's from tracing. i.e I want the agent to generate traces and spans only for the functions annotated with
@WithSpan
. I went through the instruction here https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#enable-manual-instrumentation-only. After adding the following properties, no traces get generated even for api's annotated with@WithSpan
annotation.Sample Code.
The save method inside service is also annotated with
@WithSpan
, but no traces gets reported.Im sure Im missing something here. Can someone advice on what needs to be done to achieve the above scenario?
Additional Comments:
I guess manual instrumentation would be suitable here, but I really like the simplicity of setting up the agent, and annotation. And also would not want to be adding much to the codebase. Having an agent makes tracing less code intrusive. So the end goal which I would prefer is to still use agent, but agent should only generate traces and spans for annotated methods. I am also exploring adding custom samplers as extension to agent, but wanted to check if there is any other simple way to achieve this.
Beta Was this translation helpful? Give feedback.
All reactions