Skip to content

Add support for OpenTelemetry LoggingΒ #2033

@ppkarwasz

Description

@ppkarwasz

We should consider adding support for the OpenTelemetry Logging specification to Log4j API 3.x.

This would require:

  • creating a new log4j-otel bridge that implements LoggerProvider,
  • enhance the Log4j API to help with implementation of log4j-otel. I am mostly concerned about the LogRecordBuilder#setContext method, i.e. a way to programmatically inject context data into a logging event like we do with LogBuilder#withLocation for the location data. We obviously don't expect users to add context data manually in their code, but some instrumentation can do it the same way we inject location with Log4j Transformer Maven plugin.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdditions or updates to features

    Type

    No type

    Projects

    Status

    To triage

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions