Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed when kotlin("jvm") plugin is used #12741

Open
rkudryashov opened this issue Nov 17, 2024 · 1 comment
Open

Build failed when kotlin("jvm") plugin is used #12741

rkudryashov opened this issue Nov 17, 2024 · 1 comment
Labels
bug Something isn't working needs triage New issue that requires triage

Comments

@rkudryashov
Copy link

Describe the bug

Build failed when kotlin("jvm") plugin is used

Steps to reproduce

You can use this project:

  • add kotlin("jvm") version "2.0.21" to plugins list in build.gradle.kts
  • execute ../gradlew bootBuildImage --imageName=otel-native-graalvm

Expected behavior

Build has no errors

Actual behavior

Build fails with:

> Task :opentelemetry-examples-spring-native:compileAotJava FAILED
...opentelemetry-java-examples\spring-native\build\generated\aotSources\io\opentelemetry\instrumentation\spring\autoconfigure\OpenTelemetryAutoConfiguration__BeanDefinitions.java:8: error: cannot find symbol
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
                                         ^
  symbol:   class AutoConfiguredOpenTelemetrySdk
  location: package io.opentelemetry.sdk.autoconfigure
...

Javaagent or library instrumentation version

2.10.0

Environment

JDK: GraalVM
OS: Windows

Additional context

It seems that OpenTelemetry for Spring Boot Native app written in Kotlin is not supported. There is no issue in the specified demo project if I disable org.graalvm.buildtools.native plugin.

@rkudryashov rkudryashov added bug Something isn't working needs triage New issue that requires triage labels Nov 17, 2024
@laurit
Copy link
Contributor

laurit commented Nov 18, 2024

Looks like after adding the kotlin plugin only api scoped dependencies from https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts are added to aotCompileClasspath. Adding implementation("io.opentelemetry:opentelemetry-sdk-extension-incubator") makes the example project build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that requires triage
Projects
None yet
Development

No branches or pull requests

2 participants