# Automatic traces from tracing doesn't match with MDC traces

**URL:** <https://discuss.elastic.co/t/automatic-traces-from-tracing-doesnt-match-with-mdc-traces/373776>\
**Category:** Logs\
**Tags:** java\
**Created:** [January 28, 2025, 4:03pm UTC](https://discuss.elastic.co/t/automatic-traces-from-tracing-doesnt-match-with-mdc-traces/373776 "2025-01-28T16:03:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FranM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franm/32/135098_2.png) [@FranM](https://discuss.elastic.co/u/FranM)\
**Post date:** [January 28, 2025, 4:03pm UTC](https://discuss.elastic.co/t/automatic-traces-from-tracing-doesnt-match-with-mdc-traces/373776/1 "2025-01-28T16:03:11Z")

</div>

Good Morning, I am using ecs structured logging (logging.structured.format.console=ecs) and io.micrometer:micrometer-tracing-bridge-brave with a Spring boot 3.4.2 .

My trace from trace.id is coming from MDC and traceId added automatically from micrometer-tracing-bridge-brave. But they have different values.  
I am not sure if there is a way to correlate both traces and which should be as the main one.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![Jonas\_Kunz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_kunz/32/110740_2.png) [@Jonas\_Kunz](https://discuss.elastic.co/u/Jonas_Kunz)\
**Post date:** [January 29, 2025, 2:41pm UTC](https://discuss.elastic.co/t/automatic-traces-from-tracing-doesnt-match-with-mdc-traces/373776/2 "2025-01-29T14:41:26Z")

</div>

To my knowledge the spring structured logging mechanism you are referring to doesn't rely on our [ecs-logging](https://github.com/elastic/ecs-logging) library, it just uses the ECS output format.

Therefore I think it would be best for you to ask the spring folks instead.
