-
Notifications
You must be signed in to change notification settings - Fork 885
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
Instrumentation names for javaagent vs library instrumentation #1436
Comments
From a code convention point of view, if you were to use the same packages for both then you could use package private classes and methods where classes need to be accessed from the agent. This also has the benefit of decreasing bytecode size |
Should we use the following pattern for all our instrumentation names:
? E.g. |
It would be nice to be able to tell the difference between library and javaagent instrumentation when they are both present (to see which one backed off for example). |
Won't spans created by javaagent have the Also, we already have a couple of javaagent instrumentations that simply add the library interceptor/listener, the same way as how library instrumentation is supposed to be used. We don't change their instrumentation names, same value as library instrumentation is passed to the |
Yeah I feel as if which code creates the spans is always deterministic - it might be a bit simpler to distinguish them if the names are different but don't think it's worth extra complexity (we can't expose instrumentation name as an option in library instrumentation, so any solution for sharing library instrumentation with javaagent and making the names different seems quite difficult). |
I'm not clear what you mean, can you clarify? |
@anuraaga @mateuszrzeszutek and I discussed this in meeting yesterday, summary:
|
Should the instrumentation name be the same for both javaagent and library instrumentation?
E.g.
io.opentelemetry.grpc
Or should they be different?
E.g.
io.opentelemetry.grpc
andio.opentelemetry.javaagent.grpc
We have the
telemetry.auto.version
resource attribute, but that will be applied to library instrumentation when running under the javaagent also, so I don't think we will be able to tell whether spans originated from javaagent instrumentation or library instrumentation in this case.I'm not sure how important this is to know this difference though (and our goal is to suppress library instrumentation in this case #903).
If we want the instrumentation names to be different, one option would be for the javaagent to pass in named tracers when constructing the library tracers.
The text was updated successfully, but these errors were encountered: