Skip to content

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Oct 29, 2025

Fixes #14191

@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
@zeitlinger zeitlinger force-pushed the instrument-extended-open-telemetry branch from 751e093 to e7a46a5 Compare November 8, 2025 10:55
@zeitlinger zeitlinger marked this pull request as ready for review November 8, 2025 11:30
@zeitlinger
Copy link
Member Author

opentelemetry-api-1.47 has this error - not sure what the problem is

    [otel.javaagent 2025-11-08 12:09:21:713 +0100] [Test worker] WARN io.opentelemetry.javaagent.tooling.instrumentation.MuzzleMatcher - Instrumentation skipped, mismatched references were found: opentelemetry-api [class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_56.incubator.OpenTelemetryApiIncubatorInstrumentationModule] on jdk.internal.loader.ClassLoaders$AppClassLoader@76ed5528
    [otel.javaagent 2025-11-08 12:09:21:729 +0100] [Test worker] WARN io.opentelemetry.javaagent.tooling.instrumentation.MuzzleMatcher - -- io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_56.incubator.ApplicationOpenTelemetry156Incubator:39 Missing class io.opentelemetry.api.incubator.config.ConfigProvider
    [otel.javaagent 2025-11-08 12:09:21:729 +0100] [Test worker] WARN io.opentelemetry.javaagent.tooling.instrumentation.MuzzleMatcher - -- io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_56.incubator.ApplicationOpenTelemetry156Incubator:0 Missing class io.opentelemetry.api.incubator.ExtendedOpenTelemetry
    [otel.javaagent 2025-11-08 12:09:21:729 +0100] [Test worker] WARN io.opentelemetry.javaagent.tooling.instrumentation.MuzzleMatcher - -- io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_56.incubator.config.ApplicationDeclarativeConfigProperties156Incubator:0 Missing class io.opentelemetry.api.incubator.config.DeclarativeConfigProperties

@zeitlinger
Copy link
Member Author

@laurit can you help with the error?

@zeitlinger
Copy link
Member Author

@laurit can you help with the error?

I think I figured it out 😄

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