You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an application using the Java agent creates a tracer, the instrumentation version is incorrectly set as the schema URL instead. Browsing the source code for the Java agent, it appears there is a copy'n'paste bug on this line
It appears
agentTracerBuilder.setSchemaUrl(s);
should instead be
agentTracerBuilder.setInstrumentationVersion(s);
Steps to reproduce
Using code similar to the following for an application run with the Java agent results in spans created by the application to have incorrect instrumentation library attributes:
What did you expect to see?
I expected to see spans (in Jaeger) created by the application to have the tag otel.library.name with value my-library and tag otel.library.version with value 1.0.0
What did you see instead?
I see spans created by the application with tag otel.library.name as expected, but no tag otel.library.version.
On further investigation using a Java debugger, I see that fields for a SdkTracerBuilder instance are incorrectly set, where field instrumentationVersion is null and schemaUrl is 1.0.0.
Note that spans created by the agent are fine, they have expected values for tags otel.library.name and otel.library.version.
What version are you using?
Java agent version 1.7.2
Environment
Compiler: openjdk version "11.0.11" 2021-04-20
OS: Ubuntu 20.04
Runtime (if different from JDK above): OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OS (if different from OS compiled on): Windows 10, running WSL 2
Additional context
My application is actually written in Clojure, so I've had to simplify some of the details above. Apologies in advance if my Java syntax is a little off!
The text was updated successfully, but these errors were encountered:
Describe the bug
When an application using the Java agent creates a tracer, the instrumentation version is incorrectly set as the schema URL instead. Browsing the source code for the Java agent, it appears there is a copy'n'paste bug on this line
It appears
should instead be
Steps to reproduce
Using code similar to the following for an application run with the Java agent results in spans created by the application to have incorrect instrumentation library attributes:
What did you expect to see?
I expected to see spans (in Jaeger) created by the application to have the tag
otel.library.name
with valuemy-library
and tagotel.library.version
with value1.0.0
What did you see instead?
I see spans created by the application with tag
otel.library.name
as expected, but no tagotel.library.version
.On further investigation using a Java debugger, I see that fields for a
SdkTracerBuilder
instance are incorrectly set, where fieldinstrumentationVersion
is null andschemaUrl
is1.0.0
.Note that spans created by the agent are fine, they have expected values for tags
otel.library.name
andotel.library.version
.What version are you using?
Java agent version 1.7.2
Environment
Compiler: openjdk version "11.0.11" 2021-04-20
OS: Ubuntu 20.04
Runtime (if different from JDK above): OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OS (if different from OS compiled on): Windows 10, running WSL 2
Additional context
My application is actually written in Clojure, so I've had to simplify some of the details above. Apologies in advance if my Java syntax is a little off!
The text was updated successfully, but these errors were encountered: