-
Notifications
You must be signed in to change notification settings - Fork 47
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
Point out CDI restrictions with the mpTelemetry 2.0 WithSpan annotation #7568
Comments
Hi @yasmin-aumeeruddy - the updated draft (per our slack conv) is now ready for review: If any further edits are needed, just let me know. When you're satisfied with the update, you can add the |
Peer Review (latest/telemetry-trace.html#manual)After you complete those prerequisites, you’re ready to instrument your code. Any information that you add to a span is visible when you look at traces on your trace server. Doubts regarding codeblock see additional spacing (Space after , Also placement of { )
->
This annotation creates a new Span and establishes any required relationships with the current trace context. subspan -> sub-span ? The following important considerations apply to manual instrumentation. You must call the .end() method on any span you create, otherwise the span is not recorded. Therefore, when you create a span, you usually also want to make it current. |
Hi @ramkumar-k-9286 thanks for reviewing, all changes implemented except:
|
Please describe the problem you are having with the documentation. Is information missing, inaccurate, or unclear? Tell us about the context where you encountered the problem so we can understand how to address it.
There is missing information for MicroProfile Telemetry (versions 1.0, 1.1 and 2.0). Specifically, in the manual instrumentation section.
We currently show:
It would be helpful for users to know that
@WithSpan
adds a CDI interceptor and CDI interceptors are only called when you call the method directly on an object which was injected or looked up from CDI. They don't get called when you call a public method within the same class. Therefore in the above example, if there was code in spanName() that called the spanArgs(arg) method, a child span would not be created for spanArgs(arg). If a child span is desired when spanArgs(args) is called internally, the @WithSpan annotation should not be used. Instead, a Tracer and spanBuilder should be used like the folliowing example that is already in the docs:The text was updated successfully, but these errors were encountered: