Using the javaagent does not configure BatchLogRecordProcessor and therefore MapMessage attributes aren't written #13356
Labels
bug
Something isn't working
needs author feedback
Waiting for additional feedback from the author
needs triage
New issue that requires triage
stale
Describe the bug
The programmatic auto-configure mechanism initializes the
BatchLogRecordProcessor
, which honors the MapMessage attributes, whereas, when initializing with the javaagent, it seems theNoopLoggingCustomizer
is used and, therefore, attributes are never written.vs
Run with
-javaagent:/Users/scr/IdeaProjects/uup/online-activation-api/app/build/install/online-activation/agent-libs/opentelemetry-javaagent-2.12.0.jar -Dotel.javaagent.configuration-file=src/main/resources/otel.conf
log4j2.xml
Steps to reproduce
Run with javaagent vs AutoConfiguredOpenTelemetrySdk and a local otel collector and see that the logs only include attributes for the programmatic approach.
Expected behavior
javaagent should also configure a LogRecordProcessor (or be told which processor to use) so that attributes are sent to the collector.
Actual behavior
attributes are omitted when using the javaagent approach
Javaagent or library instrumentation version
2.12.0
Environment
JDK:
OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)
OS:
Darwin arm64
15.3 (24D60)
Additional context
No response
The text was updated successfully, but these errors were encountered: