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
When disableShadowRelocate is true, all tests will fail with the following exception:
'io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder io.opentelemetry.instrumentation.api.instrumenter.Instrumenter.builder(io.opentelemetry.api.OpenTelemetry, java.lang.String, io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor)'
java.lang.NoSuchMethodError: 'io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder io.opentelemetry.instrumentation.api.instrumenter.Instrumenter.builder(io.opentelemetry.api.OpenTelemetry, java.lang.String, io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor)'
at io.opentelemetry.instrumentation.testing.TestInstrumenters.<init>(TestInstrumenters.java:40)
at io.opentelemetry.instrumentation.testing.InstrumentationTestRunner.<init>(InstrumentationTestRunner.java:47)
at io.opentelemetry.instrumentation.testing.AgentTestRunner.<init>(AgentTestRunner.java:44)
at io.opentelemetry.instrumentation.testing.AgentTestRunner.<clinit>(AgentTestRunner.java:37)
at io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension.<init>(AgentInstrumentationExtension.java:35)
at io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension.create(AgentInstrumentationExtension.java:39)
at io.opentelemetry.javaagent.instrumentation.spring.webflux.v5_0.server.SpringWebfluxTest.<clinit>(SpringWebfluxTest.java:89)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1132)
at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1113)
at java.base/java.lang.reflect.Field.get(Field.java:425)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Steps to reproduce
Set disableShadowRelocate=true and run any test.
Expected behavior
Tests work properly.
Actual behavior
All tests failed.
Javaagent or library instrumentation version
1.32.0.SNAPSHOT(main branch)
Environment
JDK: Amazon Corretto Version 17.05 OS: Window 11
Additional context
When we set disableShadowRelocate=true
Class Instrumenter will not be shaded and turned to be io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter. Class TestInstrumenters uses Instrumenter in bootstrap classloader like the following picture:
So the Instrumenter get the wrong param in builder method, expected type is io.opentelemetry.javaagent.shaded.io.opentelemetry.api.Opentelemetry but actually is io.opentelemetry.api.Opentelemetry.
Is that an expected behavior? Should we tell users in the documentation?
The text was updated successfully, but these errors were encountered:
Describe the bug
When
disableShadowRelocate
is true, all tests will fail with the following exception:Steps to reproduce
Set
disableShadowRelocate=true
and run any test.Expected behavior
Tests work properly.
Actual behavior
All tests failed.
Javaagent or library instrumentation version
1.32.0.SNAPSHOT(main branch)
Environment
JDK: Amazon Corretto Version 17.05
OS: Window 11
Additional context
When we set
disableShadowRelocate=true
Class
Instrumenter
will not be shaded and turned to beio.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter
. ClassTestInstrumenters
usesInstrumenter
in bootstrap classloader like the following picture:So the
Instrumenter
get the wrong param inbuilder
method, expected type isio.opentelemetry.javaagent.shaded.io.opentelemetry.api.Opentelemetry
but actually isio.opentelemetry.api.Opentelemetry
.Is that an expected behavior? Should we tell users in the documentation?
The text was updated successfully, but these errors were encountered: