Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS log-format doesn't comply for trace fields #45585

Open
kerkhofsd opened this issue Jan 14, 2025 · 3 comments
Open

ECS log-format doesn't comply for trace fields #45585

kerkhofsd opened this issue Jan 14, 2025 · 3 comments
Labels
area/logging kind/enhancement New feature or request

Comments

@kerkhofsd
Copy link

Description

Since 3.17, Quarkus supports the ECS log-format (introduced in #43232). For example by setting following property:

quarkus.log.console.json.log-format=ecs

According to the ECS Tracing Field Details, expected fields are span.id, trace.id, ...

However AS-IS the ecs log-format still results in the nested MDC object:

... "mdc":{"spanId":"00919aa23135a7ed","parentId":"00919aa23135a7ed","traceId":"62c2815679af74499c27d6bc584b0ffb","sampled":"true"}, ...

Furthermore, I currently don't see any way possible to get the log keys compliant to the "ECS Tracing Field Details" specs.
I tried with quarkus.log.console.json.key-overrides=mdc.traceId=trace.id, which results in IllegalArgumentException: No enum constant org.jboss.logmanager.formatters.StructuredFormatter.Key.MDC.TRACEID

Implementation ideas

In case the ecs log format is configured, by default use trace field logging keys as per ECS specification.

@kerkhofsd kerkhofsd added the kind/enhancement New feature or request label Jan 14, 2025
Copy link

quarkus-bot bot commented Jan 14, 2025

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@brunobat
Copy link
Contributor

The tracing data is in the MDC context.
There needs to be an additional log formatting in the ECS side to place that data in the correct fields.

@gsmet
Copy link
Member

gsmet commented Jan 15, 2025

@troosan any chance you could have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants