Skip to content

Dynamic Instrumentation fails to start when tracing is configured to use UDS #7165

@kevinfrommelt

Description

@kevinfrommelt

Problem

Starting in 1.35.0, we're getting the following error on startup

Starting Dynamic Instrumentation
Throwable thrown while starting debugger agent
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at datadog.trace.bootstrap.Agent.startDebuggerAgent(Agent.java:1035)
at datadog.trace.bootstrap.Agent.maybeStartDebugger(Agent.java:1021)
at datadog.trace.bootstrap.Agent.access$900(Agent.java:66)
at datadog.trace.bootstrap.Agent$InstallDatadogTracerCallback.execute(Agent.java:493)
at datadog.trace.bootstrap.Agent.start(Agent.java:318)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at datadog.trace.bootstrap.AgentBootstrap.agentmain(AgentBootstrap.java:71)
at datadog.trace.bootstrap.AgentBootstrap.premain(AgentBootstrap.java:55)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but was 'unix'
at datadog.okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1328)
at datadog.okhttp3.HttpUrl.get(HttpUrl.java:916)
at com.datadog.debugger.uploader.BatchUploader.<init>(BatchUploader.java:106)
at com.datadog.debugger.uploader.BatchUploader.<init>(BatchUploader.java:87)
at com.datadog.debugger.uploader.BatchUploader.<init>(BatchUploader.java:83)
at com.datadog.debugger.sink.DebuggerSink.<init>(DebuggerSink.java:46)
at com.datadog.debugger.agent.DebuggerAgent.run(DebuggerAgent.java:66)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 14 more

This PR seems to be related #7094

Specifically https://github.com/DataDog/dd-trace-java/pull/7094/files#diff-a1f343138a54cf176f642762c988766f4b0561a51ca7248d6abbd3fcc717c038

Configuration

These are the notable changes to the Datadog configuration that gets logged

- "version": "1.34.0~6666f39b87",
- "agent_url": "http://localhost:8126",
- "agent_error": true,
+ "version": "1.35.0~97065ed022",
+ "agent_url": "unix:///var/run/datadog/apm.socket",
+ "agent_error": false,

These are the environment variables we have set

DD_APM_IGNORE_RESOURCES=GET /actuator/.*
DD_DATA_STREAMS_ENABLED=true
DD_DBM_PROPAGATION_MODE=full
DD_DOGSTATSD_URL=unix:///var/run/datadog/dsd.socket
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
DD_ENTITY_ID=a3a3dad8-ca05-466e-8b5b-195e7c241855
DD_ENV=env
DD_INSTRUMENTATION_INSTALL_ID=aada216b-ea90-4f59-b890-a66c175b010f
DD_INSTRUMENTATION_INSTALL_TIME=1717615394
DD_INTEGRATION_JDBC_DATASOURCE_ENABLED=true
DD_KAFKA_LEGACY_TRACING_ENABLED=false
DD_LOGS_INJECTION=true
DD_PROFILING_ALLOCATION_ENABLED=true
DD_PROFILING_DIRECTALLOCATION_ENABLED=true
DD_PROFILING_ENABLED=true
DD_SERVICE=ats-sportsbook
DD_TAGS=git.commit.sha:<sha> git.repository_url:<repo>
DD_TRACE_AGENT_URL=unix:///var/run/datadog/apm.socket
DD_TRACE_DB_CLIENT_SPLIT_BY_INSTANCE=true
DD_TRACE_OTEL_ENABLED=true
DD_VERSION=1.2.3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions