Support agentless log submission for Logback - #12725
daniel-mohedano wants to merge 4 commits into
Conversation
CI Visibility Test Environment - sbt-scalatestJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - nebula-release-pluginJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - netflix-zuulJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - pass4sJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - heliboardJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - reactive-streams-jvmJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
CI Visibility Test Environment - sonar-kotlinJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - jolokiaJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - okhttpJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - spring_bootJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - sonar-javaJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
What Does This Do
This is the first PR of a stack. Together, the stack lets the tracer submit test logs from more logging backends when agentless log submission is enabled (
DD_AGENTLESS_LOG_SUBMISSION_ENABLED=true). Today only Log4j2 supports this. Tests often run in CI without a Datadog Agent, so logs from other backends never reach Datadog, even though their trace and span IDs are already injected.This PR adds Logback:
Logger.callAppenderscapture hook now also runs when agentless log submission is enabled. Before, only app log collection (DD_APP_LOGS_COLLECTION_ENABLED) enabled it.DD_AGENTLESS_LOG_SUBMISSION_LEVEL.contextMapwith the user MDC and the correlation IDs of the producer thread, captured before any async appender runsDD_TRACE_ENABLED=false).LoggingEventInstrumentationis now a context tracking module, like the existing capture hook.Stack:
Motivation
Test logs are only useful in Test Optimization if they reach Datadog. Users who log with a backend other than Log4j2 get no logs with agentless submission.
Additional Notes
Compatibility:
Testing:
AsyncAppenderdelivery after the producer scope closes:dd-smoke-tests:log-injection:testpasses.Jira ticket: SDTEST-3805