Skip to content
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

Distinguish between the various servlet tracers for easier debugging. #1979

Merged

Conversation

jkwatson
Copy link
Contributor

@jkwatson jkwatson commented Jan 4, 2021

While trying to track down an issue with a customer, I ran into the fact that I couldn't figure out which servlet instrumentation was generating the spans. This will help with that.

@trask
Copy link
Member

trask commented Jan 5, 2021

hey @jkwatson, I was assuming that the instrumentation library name is supposed to be the same for all instrumentation produced by a given instrumentation library, which would rule out the .request, .response suffixes.

for adding the version number to the library name, we used to have that, but discussed and removed it in #1260.

definitely open to revisiting that discussion tho.

is this a case where you were debugging without access to the javaagent debug log?

@jkwatson
Copy link
Contributor Author

jkwatson commented Jan 5, 2021

hey @jkwatson, I was assuming that the instrumentation library name is supposed to be the same for all instrumentation produced by a given instrumentation library, which would rule out the .request, .response suffixes.

I'd be fine with that, although I don't think it matters too much, one way or the other.

is this a case where you were debugging without access to the javaagent debug log?

Yes, all we had were a couple of sample spans in the final observability system. Being able to detect what servlet version was being instrumented would have been very useful.

@trask
Copy link
Member

trask commented Jan 5, 2021

Yes, all we had were a couple of sample spans in the final observability system. Being able to detect what servlet version was being instrumented would have been very useful.

can you create an issue to revisit the decision made in #1260? I'd like to give others a chance to weigh in, and then apply the change consistently across all instrumentation

@@ -16,7 +16,7 @@ public static Servlet2HttpServerTracer tracer() {

@Override
protected String getInstrumentationName() {
return "io.opentelemetry.javaagent.servlet";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These actually seem like a no-brainer to me - our artifact names are also e.g., opentelemetry-javaagent-servlet-2.2, the name of the library. And these are supposed to reflect the name of the library.

I understand the potential for confusion due to the lack of something like a + but I think it's just the nature of how instrumentation libraries are named.

@@ -16,6 +16,6 @@ public static RequestDispatcherTracer tracer() {

@Override
protected String getInstrumentationName() {
return "io.opentelemetry.javaagent.servlet";
return "io.opentelemetry.javaagent.servlet.request";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if I like it but I guess for consistency and to reflect "name of instrumentation library", these should use .common?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I wasn't really sure what these should say. .common seems to accurately and uniquely identify the instrumentation, though, and that's definitely the most important thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@jkwatson
Copy link
Contributor Author

jkwatson commented Jan 6, 2021

Yes, all we had were a couple of sample spans in the final observability system. Being able to detect what servlet version was being instrumented would have been very useful.

can you create an issue to revisit the decision made in #1260? I'd like to give others a chance to weigh in, and then apply the change consistently across all instrumentation

#1992

jkwatson and others added 4 commits January 7, 2021 08:16
…/opentelemetry/javaagent/instrumentation/servlet/v2_2/Servlet2HttpServerTracer.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
…/opentelemetry/javaagent/instrumentation/servlet/v3_0/Servlet3HttpServerTracer.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
…/io/opentelemetry/javaagent/instrumentation/servlet/dispatcher/RequestDispatcherTracer.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
…/io/opentelemetry/javaagent/instrumentation/servlet/http/HttpServletResponseTracer.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
@iNikem
Copy link
Contributor

iNikem commented Jan 19, 2021

Anybody wants to chime in on this before we merge? I don't :)

@iNikem iNikem merged commit 4c1144c into open-telemetry:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants