Skip to content

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Oct 29, 2025

Fixes #14191

Blocked by open-telemetry/opentelemetry-java#7799 - without it, this error is returned

ExtendedOpenTelemetryTest > getConfig() FAILED
    java.lang.AssertionError: 
    Expecting actual:
      io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127@16949dfa
    to be an instance of:
      io.opentelemetry.api.incubator.ExtendedOpenTelemetry
    but was instance of:
      io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127
        at io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_55.incubator.ExtendedOpenTelemetryTest.getConfig(ExtendedOpenTelemetryTest.java:32)

TODO: need to change 1.55 to 1.56 once open-telemetry/opentelemetry-java#7799 has been released

@zeitlinger
Copy link
Member Author

I'm getting

class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 cannot be cast to class io.opentelemetry.api.incubator.ExtendedOpenTelemetry (io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 and io.opentelemetry.api.incubator.ExtendedOpenTelemetry are in unnamed module of loader 'app')
java.lang.ClassCastException: class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 cannot be cast to class io.opentelemetry.api.incubator.ExtendedOpenTelemetry (io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 and io.opentelemetry.api.incubator.ExtendedOpenTelemetry are in unnamed module of loader 'app')

@laurit can you give me a hint?

@laurit
Copy link
Contributor

laurit commented Oct 30, 2025

I'm getting

class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 cannot be cast to class io.opentelemetry.api.incubator.ExtendedOpenTelemetry (io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 and io.opentelemetry.api.incubator.ExtendedOpenTelemetry are in unnamed module of loader 'app')
java.lang.ClassCastException: class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 cannot be cast to class io.opentelemetry.api.incubator.ExtendedOpenTelemetry (io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_27.ApplicationOpenTelemetry127 and io.opentelemetry.api.incubator.ExtendedOpenTelemetry are in unnamed module of loader 'app')

@laurit can you give me a hint?

I thin you forgot to actually use the ApplicationOpenTelemetry155Incubator that you added. Have a look at

@zeitlinger
Copy link
Member Author

Thanks @laurit - can you check if this PR together with the SDK PR make sense (see ticket description)?

@zeitlinger zeitlinger marked this pull request as draft October 30, 2025 12:29
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.

Add instrumentation for ExtendedOpenTelemetry

2 participants