Skip to content

Getting java.lang.ClassNotFoundException: io.opentelemetry.api.incubator.common.ExtendedAttributes after upgrading opentelemetry-logback-mdc-1.0 #13840

@chrissalerno

Description

@chrissalerno

Describe the bug

There seems to be a dependency issue with opentelemetry-logback-mdc-1.0 2.15.0-alpha, it is importing opentelemetry-api version 1.49.0 which is incompatible with 1.50.0 which is the version that should be imported.

Steps to reproduce

Upgraded Opentelemetry to version 1.50.0 and also opentelemetry-logback-mdc-1.0 to version 2.15.0-alpha

These versions should be compatible with each other, however it is importing an older version of opentelemetry-api.

Expected behavior

Correct versions of the dependencies should be brought in to prevent failure.

Actual behavior

Throws Exception in thread "BatchLogRecordProcessor_WorkerThread-1" java.lang.NoClassDefFoundError: io.opentelemetry.api.incubator.common.ExtendedAttributes
	at io.opentelemetry.sdk.logs.ExtendedSdkReadWriteLogRecord.getImmutableExtendedAttributes(ExtendedSdkReadWriteLogRecord.java:116)
	at io.opentelemetry.sdk.logs.ExtendedSdkReadWriteLogRecord.toLogRecordData(ExtendedSdkReadWriteLogRecord.java:135)
	at io.opentelemetry.sdk.logs.ExtendedSdkReadWriteLogRecord.toLogRecordData(ExtendedSdkReadWriteLogRecord.java:24)
	at io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor$Worker.run(BatchLogRecordProcessor.java:235)
	at java.base/java.lang.Thread.run(Thread.java:1587)
Caused by: java.lang.ClassNotFoundException: io.opentelemetry.api.incubator.common.ExtendedAttributes
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

Javaagent or library instrumentation version

1.50.0

Environment

JDK: 21
OS: Mac OS

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds author feedbackWaiting for additional feedback from the authorneeds triageNew issue that requires triagestale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions