msgraph-sdk-java icon indicating copy to clipboard operation
msgraph-sdk-java copied to clipboard

possibly missing dependencies for opentelemetry

Open wyrdthud opened this issue 1 year ago • 1 comments

Expected behavior

My application calls graphClient.users().byUserId(userId).sendMail().post(sendMailPostRequestBody); It does send an email. A dependency in my pom.xml is: <dependency> <groupId>com.microsoft.graph</groupId> <artifactId>microsoft-graph</artifactId> <version>6.5.1</version> </dependency>

Actual behavior

After changing the version of the microsoft-graph dependency to 6.6.0 the email cannot be send. Error message: java.lang.NoClassDefFoundError: io/opentelemetry/semconv/incubating/HttpIncubatingAttributes

Steps to reproduce the behavior

Try sending an email like mentioned above while using microsoft-graph version 6.6.0

Workaround

After adding the following dependencies to my pom.xml my application can send an email when using microsoft-graph version 6.6.0: <dependency> <groupId>io.opentelemetry.semconv</groupId> <artifactId>opentelemetry-semconv</artifactId> <version>1.25.0-alpha</version> </dependency> <dependency> <groupId>io.opentelemetry.semconv</groupId> <artifactId>opentelemetry-semconv-incubating</artifactId> <version>1.25.0-alpha</version> </dependency>

wyrdthud avatar Apr 23 '24 14:04 wyrdthud

Hi @wyrdthud Thanks for using the java SDK and for reaching out. We're getting rid of those dependencies all together because they are problematic. The changes have already been started in https://github.com/microsoft/kiota-java/pull/1233 We now need to roll out those changes to v1 and beta. Most likely on the next release.

baywet avatar Apr 23 '24 14:04 baywet

@wyrdthud this was resolved a couple of months ago. Sorry for the delayed update. Feel free to upgrade to the latest version of the SDK and please re-open in case you face the same issue.

Ndiritu avatar Sep 23 '24 13:09 Ndiritu