-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
needs triageNew issue that requires triageNew issue that requires triage
Description
Describe the bug
When using opentelemetry-javaagent.jar version 2.5.0 with -Dotel.traces.exporter=zipkin the exporter seems ignored and still attempt to connect to port 4318. Setting via OTEL_TRACES_EXPORTER environment property also has same behavior.
opentelemetry-javaagent.jar version 1.33.4 works as expected.
Steps to reproduce
Launch java application with javaagent: opentelemetry-javaagent v2.5.0
D:\apps\jdk\jdk-21\bin\java.exe -javaagent:D:/java/exec/opentelemetry-javaagent-v2.5.0.jar ^
-Dotel.service.name=dongo ^
-Dotel.traces.exporter=zipkin ^
-Dotel.metrics.exporter=none ^
-Dotel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans ^
-jar target\med-spring-boot-demo-0.0.1-SNAPSHOT.jar
Expected behavior
Using version 1.x WORKS: opentelemetry-javaagent v1.33.4
D:\apps\jdk\jdk-21\bin\java.exe -javaagent:D:/java/exec/opentelemetry-javaagent-v1.33.4.jar ^
-Dotel.service.name=dongo ^
-Dotel.traces.exporter=zipkin ^
-Dotel.metrics.exporter=none ^
-Dotel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans ^
-jar target\med-spring-boot-demo-0.0.1-SNAPSHOT.jar
Actual behavior
Error log:
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[otel.javaagent 2024-07-10 13:46:37:500 +0800] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.5.0
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.2.6)
2024-07-10T13:46:40.256+08:00 INFO 10408 --- [med-spring-boot-demo] [ main] c.g.d.d.m.MedSpringBootDemoApplication : Starting MedSpringBootDemoApplication using Java 21.0.1 with PID 10408 (D:\work\medium\donnie-med-spring-boot-demo\repo\med-spring-boot-demo\target\classes started by userX in D:\work\medium\donnie-med-spring-boot-demo\repo\med-spring-boot-demo)
2024-07-10T13:46:40.269+08:00 INFO 10408 --- [med-spring-boot-demo] [ main] c.g.d.d.m.MedSpringBootDemoApplication : No active profile set, falling back to 1 default profile: "default"
2024-07-10T13:46:41.102+08:00 INFO 10408 --- [med-spring-boot-demo] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[otel.javaagent 2024-07-10 13:46:41:157 +0800] [OkHttp http://localhost:4318/...] ERROR io.opentelemetry.exporter.internal.http.HttpExporter - Failed to export logs. The request could not be executed. Full error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4318
java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4318
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Suppressed: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:4318
... 19 more
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:751)
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
... 18 more
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:751)
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
... 18 more
2024-07-10T13:46:41.195+08:00 INFO 10408 --- [med-spring-boot-demo] [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 81 ms. Found 7 JPA repository interfaces.
...
Javaagent or library instrumentation version
v2.5.0
Environment
JDK: 21
OS: Windows 10
Additional context
No response
Metadata
Metadata
Assignees
Labels
needs triageNew issue that requires triageNew issue that requires triage