-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't workingneeds triageNew issue that requires triageNew issue that requires triage
Description
Describe the bug
When using micrometer-tracing, micrometer-tracing-bridge-otel and opentelemetry-spring-boot-starter together, the MDC contains duplicate trace and span fields - both in OpenTelemetry format (trace_id, span_id) and Micrometer format (traceId, spanId).
Steps to reproduce
- Clone the example project: https://github.com/VladislavBakshanskij/opentelemetry-micrometer-duplicate-traceId
- Run the Spring Boot application
- Access http://localhost:8080
- Observe the log output containing duplicate fields:
com.example.opentelemetry_micrometer.Controller - [traceId=fe7bbf4df9a89b8d622ab12a36405ecc, spanId=a8b5ecbbefddaf6c, trace_id=fe7bbf4df9a89b8d622ab12a36405ecc, trace_flags=01, span_id=a8b5ecbbefddaf6c] - Get method invoked
Expected behavior
MDC should contain trace and span fields in a single consistent format (either Micrometer or OpenTelemetry format).
Actual behavior
MDC automatically populates tracing fields in both formats simultaneously:
- Micrometer format: traceId, spanId
- OpenTelemetry format: trace_id, span_id, trace_flags
Javaagent or library instrumentation version
2.16.0
Environment
JDK: Oracle OpenJDK 21.0.2
OS: macOS sequoia 15.4.1
Spring boot: 3.4.5
micrometer-tracing: 1.4.5
micrometer-tracing-bridge-otel: 1.4.5
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageNew issue that requires triageNew issue that requires triage