Skip to content

Automatically log correlation IDs when Micrometer tracing is being used #33280

Closed
@mhalbritter

Description

@mhalbritter

Right now, as documented users have to set this in their config to get span id and trace ids in logs:

logging.pattern.level=%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]

Besides that it abuses the logging level pattern, it is not a good developer experience.

I would prefer it to be auto-configured in the case a Tracer bean is available. Not sure if this is technically feasible.

We should additionally introduce a logging.pattern.correlation property which can be used.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions