Skip to content

fix(otel): remove SDK dependencies to prevent duplicate logs with Java agent#16

Merged
MaxAnderson95 merged 1 commit into
mainfrom
fix/duplicate-otel-logs
Jan 20, 2026
Merged

fix(otel): remove SDK dependencies to prevent duplicate logs with Java agent#16
MaxAnderson95 merged 1 commit into
mainfrom
fix/duplicate-otel-logs

Conversation

@MaxAnderson95

Copy link
Copy Markdown
Owner

Summary

  • Remove opentelemetry-spring-boot-starter and related SDK dependencies from all services
  • Keep only opentelemetry-api for manual instrumentation (custom spans)
  • Update OpenTelemetryConfig classes to use GlobalOpenTelemetry.get() instead of injected beans

Problem

When the Dash0 operator injects the OTEL Java agent, having the opentelemetry-spring-boot-starter and SDK dependencies embedded in the application causes double instrumentation:

  1. The embedded SDK sets up its own log exporters via Logback appender
  2. The Java agent also sets up log exporters via Logback appender

Both capture and export the same logs to OTLP, resulting in exact duplicate log entries in the backend.

Solution

Remove all SDK/starter dependencies and let the Dash0-injected Java agent be the sole source of telemetry export. The application retains only the API dependency for manual instrumentation like custom spans.

…a agent

When the Dash0 operator injects the OTEL Java agent, having the
opentelemetry-spring-boot-starter and SDK dependencies in the
application causes double instrumentation - both the embedded SDK
and the agent capture and export logs, resulting in duplicates.

This removes all SDK/starter dependencies and keeps only the API
for manual instrumentation. The agent now handles all telemetry
export exclusively.
@MaxAnderson95 MaxAnderson95 merged commit e049555 into main Jan 20, 2026
@MaxAnderson95 MaxAnderson95 deleted the fix/duplicate-otel-logs branch January 20, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant