You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While using opentelemtry agent, when configured to use prometheus as metrics exporter, it crashed with these error :
ERROR io.opentelemetry.javaagent.OpenTelemetryAgent
java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at io.opentelemetry.sdk.autoconfigure.ClasspathUtil.checkClassExists(ClasspathUtil.java:15)
at io.opentelemetry.sdk.autoconfigure.MetricExporterConfiguration.configurePrometheusMetricReader(MetricExporterConfiguration.java:164)
at io.opentelemetry.sdk.autoconfigure.MetricExporterConfiguration.configureExporter(MetricExporterConfiguration.java:40)
at io.opentelemetry.sdk.autoconfigure.MeterProviderConfiguration.configureMeterProvider(MeterProviderConfiguration.java:43)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:313)
at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:43)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:124)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:95)
at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:65)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:35)
at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:55)
at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.HttpHandler
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at io.opentelemetry.javaagent.bootstrap.AgentClassLoader.findClass(AgentClassLoader.java:151)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
at io.opentelemetry.javaagent.bootstrap.AgentClassLoader.loadClass(AgentClassLoader.java:132)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 20 more
Steps to reproduce
Run any given java process with the classical agent configuration:
Additional context
The issue is not present in agent version 1.10.1
Also, I had a quick look at the current MetricExporterConfiguration.configurePrometheusMetricReader
implementation, and checkClassExists is not called for HttpHandler. So maybe it's just an issue with the version distributed inside the agent ?
The text was updated successfully, but these errors were encountered:
Describe the bug
While using opentelemtry agent, when configured to use prometheus as metrics exporter, it crashed with these error :
Steps to reproduce
Run any given java process with the classical agent configuration:
What did you expect to see?
To be able to get metrics through the configured port.
What did you see instead?
The error message, and no http server running
What version are you using?
v1.11.0
Environment
Compiler: "Temurin 17.0.2"
OS: "MacOS 12.1"
Additional context
The issue is not present in agent version
1.10.1
Also, I had a quick look at the current
MetricExporterConfiguration.configurePrometheusMetricReader
implementation, and
checkClassExists
is not called forHttpHandler
. So maybe it's just an issue with the version distributed inside the agent ?The text was updated successfully, but these errors were encountered: