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

Should log4j library-autoconfigure depend on library? #4912

Closed
trask opened this issue Dec 15, 2021 · 2 comments · Fixed by #4937
Closed

Should log4j library-autoconfigure depend on library? #4912

trask opened this issue Dec 15, 2021 · 2 comments · Fixed by #4937
Labels
enhancement New feature or request

Comments

@trask
Copy link
Member

trask commented Dec 15, 2021

Currently it does not, which is odd, since you would expect an autoconfigure component to depend (and automatically configure) the library component.

But in this case autoconfigure enables the context (mdc) data, but does not enable the appender, and the library only supplies the appender.

(from #4907 (comment))

@trask trask added the enhancement New feature or request label Dec 15, 2021
@trask
Copy link
Member Author

trask commented Dec 16, 2021

I'm thinking of splitting out "mdc" and "log emitting" instrumentations, e.g.

instrumentation/
  logback/
    logback-1.0/    <== emit log to otel logging pipeline
      javaagent/
      library/
      testing/
    logback-mdc-1.0/    <== inject trace_id/span_id into logback mdc
      javaagent/
      library/
      testing/
  log4j/
    log4j-2.16/    <== emit log to otel logging pipeline
      javaagent/
      library/
      testing/
    log4j-thread-context-2.16/    <== inject trace_id/span_id into log4j thread context
      javaagent/
      library/
      testing/

This should solve the log4j library-autoconfigure question in this issue.

A couple of questions:

@mateuszrzeszutek
Copy link
Member

mateuszrzeszutek commented Dec 17, 2021

  • Should we name the log4j2 artifact log4j-mdc, or use log4j2 specific terminology, e.g. log4j-thread-context?

👍 for specific terminology

  • Should the instrumentation that emits logs be just logback-1.0, or have its own classifier, e.g. logback-emit-1.0?

Hmm, maybe logback-appender-1.0? Though I'd be fine with just logback-1.0 too

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

Successfully merging a pull request may close this issue.

2 participants