You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Log4j2 appender seems to have conflicting implementation ideas. On the one hand there is the notion that Log4j2 can be initialized first, and so there is an eventsToReplay queue to deal with this. On the other hand the builder sets the OpenTelemetry instance to the noop version if none is specified, which then effectively throws away the log messages before the real OT instance has been installed, and the eventsToReplay queue never comes into play.
In my case Log4j2 is configured first, and then the OT instance, and so the idea with eventsToReplay would work great, except it's bypassed by the setting of a noop instance, and so I just lose all the log events before the OT instance is installed.
Steps to reproduce
Initialize Log4j2 first, then OT and call install.
Expected behavior
The appender should queue events before install is called (with either noop or SDK instance) and then replay them on install.
Actual behavior
Any events before install will be lost
Javaagent or library instrumentation version
1.32.0-alpha
Environment
JDK:
JDK 17 OS:
Win11
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
The Log4j2 appender seems to have conflicting implementation ideas. On the one hand there is the notion that Log4j2 can be initialized first, and so there is an eventsToReplay queue to deal with this. On the other hand the builder sets the OpenTelemetry instance to the noop version if none is specified, which then effectively throws away the log messages before the real OT instance has been installed, and the eventsToReplay queue never comes into play.
In my case Log4j2 is configured first, and then the OT instance, and so the idea with eventsToReplay would work great, except it's bypassed by the setting of a noop instance, and so I just lose all the log events before the OT instance is installed.
Steps to reproduce
Initialize Log4j2 first, then OT and call install.
Expected behavior
The appender should queue events before install is called (with either noop or SDK instance) and then replay them on install.
Actual behavior
Any events before install will be lost
Javaagent or library instrumentation version
1.32.0-alpha
Environment
JDK:
JDK 17
OS:
Win11
Additional context
No response
The text was updated successfully, but these errors were encountered: