Skip to content

Support agentless log submission for Log4j 1 - #12728

Draft
daniel-mohedano wants to merge 2 commits into
daniel.mohedano/agentless-logs-tinylogfrom
daniel.mohedano/agentless-logs-log4j1
Draft

daniel-mohedano wants to merge 2 commits into
daniel.mohedano/agentless-logs-tinylogfrom
daniel.mohedano/agentless-logs-log4j1

Conversation

@daniel-mohedano

@daniel-mohedano daniel-mohedano commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Last PR of the agentless log submission stack. It adds Log4j 1.

  • When agentless log submission is enabled, a second advice on Category.callAppenders(LoggingEvent) submits each event once.
    • It runs after the level check and before any appender, including async ones.
    • The user context comes from the Log4j 1 MDC.
  • The Log4j 1 correlation modules are now context tracking modules, so MDC injection also works with CI Visibility when tracing is disabled.
  • The log injection smoke tests now assert direct submission for Log4j 1 backends.

Stack:

  1. Logback (Support agentless log submission for Logback #12725)
  2. Shared submission helper and JBoss LogManager (Support agentless log submission for JBoss LogManager #12726)
  3. tinylog 2 (Support agentless log submission for tinylog #12727)
  4. Log4j 1 (this PR) (Support agentless log submission for Log4j 1 #12728)

Motivation

See the first PR of the stack. Log4j 1 already had correlation, but nothing submitted its events with agentless submission.

Additional Notes

  • log4j-over-slf4j replaces Category, so bridged applications are handled by the target backend. The smoke tests check that no events are duplicated.
  • The NDC is not submitted.
  • Nothing changes when agentless log submission is disabled, except the MDC injection fix above.

Testing:

  • Forked JUnit 5 instrumentation tests on 1.2.4 and latest. They cover:
    • submission with levels and exceptions
    • user MDC and collisions, child spans, no active span
    • additivity, async delivery
    • injection disabled, CI Visibility with tracing disabled
  • :dd-smoke-tests:log-injection:test and Muzzle pass.

Jira ticket: SDTEST-3805

@daniel-mohedano daniel-mohedano added type: feature Enhancements and improvements comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM comp: logs Logs Product labels Oct 2, 2026
@daniel-mohedano
daniel-mohedano added this pull request to stack #12729 October 2, 2026 09:20
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sbt-scalatest

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 56.19 56.55 $\color{green}{\blacktriangledown}$ -0.36 55.43 $\color{red}{\blacktriangle}$ +0.76 112/284
agentEvpProxy 57.42 n/a n/a n/a n/a -

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@datadog-prod-us1-6

This comment has been minimized.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - nebula-release-plugin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 37.23 37.15 $\color{red}{\blacktriangle}$ +0.08 36.42 $\color{red}{\blacktriangle}$ +0.81 67/163
agentless 35.57 36.42 $\color{green}{\blacktriangledown}$ -0.85 35.70 $\color{green}{\blacktriangledown}$ -0.13 43/135
agentlessCodeCoverage 44.67 45.38 $\color{green}{\blacktriangledown}$ -0.71 44.48 $\color{red}{\blacktriangle}$ +0.19 43/135
agentlessLineCoverage 55.39 56.55 $\color{green}{\blacktriangledown}$ -1.16 56.55 $\color{green}{\blacktriangledown}$ -1.16 42/135

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - netflix-zuul

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 88.71 89.58 $\color{green}{\blacktriangledown}$ -0.87 87.80 $\color{red}{\blacktriangle}$ +0.91 69/163
agentless 82.48 82.69 $\color{green}{\blacktriangledown}$ -0.21 81.05 $\color{red}{\blacktriangle}$ +1.43 44/130
agentlessCodeCoverage 97.50 97.04 $\color{red}{\blacktriangle}$ +0.46 97.04 $\color{red}{\blacktriangle}$ +0.46 44/130
agentlessLineCoverage 113.75 113.88 $\color{green}{\blacktriangledown}$ -0.13 111.62 $\color{red}{\blacktriangle}$ +2.13 42/133

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - heliboard

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 9.74 9.92 $\color{green}{\blacktriangledown}$ -0.18 9.92 $\color{green}{\blacktriangledown}$ -0.18 42/130

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - pass4s

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 14.18 9.92 $\color{red}{\blacktriangle}$ +4.26 9.73 $\color{red}{\blacktriangle}$ +4.45 67/146
agentless 9.63 9.73 $\color{green}{\blacktriangledown}$ -0.10 9.35 $\color{red}{\blacktriangle}$ +0.28 43/118
agentlessCodeCoverage 17.32 18.45 $\color{green}{\blacktriangledown}$ -1.13 17.03 $\color{red}{\blacktriangle}$ +0.29 41/111

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - reactive-streams-jvm

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 21.42 22.09 $\color{green}{\blacktriangledown}$ -0.67 21.65 $\color{green}{\blacktriangledown}$ -0.23 69/169
agentless 17.88 19.20 $\color{green}{\blacktriangledown}$ -1.32 19.20 $\color{green}{\blacktriangledown}$ -1.32 43/131
agentlessCodeCoverage 19.22 19.99 $\color{green}{\blacktriangledown}$ -0.77 19.99 $\color{green}{\blacktriangledown}$ -0.77 43/131
agentlessLineCoverage 26.29 27.52 $\color{green}{\blacktriangledown}$ -1.23 26.98 $\color{green}{\blacktriangledown}$ -0.69 29/79

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@dd-octo-sts

dd-octo-sts Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.06 s 14.06 s [-0.6%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 13.00 s 13.03 s [-0.8%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 17.27 s 17.26 s [-0.9%; +1.1%] (no difference)
startup:petclinic:iast:Agent 17.07 s 17.13 s [-1.1%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 16.50 s 16.76 s [-2.5%; -0.7%] (maybe better)
startup:petclinic:sca:Agent 17.19 s 16.88 s [+0.8%; +2.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.20 s 16.27 s [-1.3%; +0.5%] (no difference)

Commit: 0d1b1a6a · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-kotlin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 11.93 13.40 $\color{green}{\blacktriangledown}$ -1.47 13.13 $\color{green}{\blacktriangledown}$ -1.20 69/169
agentless 10.79 12.12 $\color{green}{\blacktriangledown}$ -1.33 11.88 $\color{green}{\blacktriangledown}$ -1.09 44/131
agentlessCodeCoverage 15.89 15.41 $\color{red}{\blacktriangle}$ +0.48 15.11 $\color{red}{\blacktriangle}$ +0.78 43/130
agentlessLineCoverage 15.54 17.38 $\color{green}{\blacktriangledown}$ -1.84 17.38 $\color{green}{\blacktriangledown}$ -1.84 42/130

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@daniel-mohedano
daniel-mohedano force-pushed the daniel.mohedano/agentless-logs-log4j1 branch from 3d65fef to 0775202 Compare October 2, 2026 09:43
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - jolokia

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 97.40 95.12 $\color{red}{\blacktriangle}$ +2.28 95.12 $\color{red}{\blacktriangle}$ +2.28 69/168
agentless 93.07 89.58 $\color{red}{\blacktriangle}$ +3.49 89.58 $\color{red}{\blacktriangle}$ +3.49 45/140
agentlessCodeCoverage 101.61 99.00 $\color{red}{\blacktriangle}$ +2.61 99.00 $\color{red}{\blacktriangle}$ +2.61 45/140
agentlessLineCoverage 104.74 101.00 $\color{red}{\blacktriangle}$ +3.74 101.00 $\color{red}{\blacktriangle}$ +3.74 42/142

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - okhttp

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 20.87 20.39 $\color{red}{\blacktriangle}$ +0.48 19.99 $\color{red}{\blacktriangle}$ +0.88 69/158
agentless 19.26 19.99 $\color{green}{\blacktriangledown}$ -0.73 19.59 $\color{green}{\blacktriangledown}$ -0.33 48/130
agentlessCodeCoverage 25.11 23.45 $\color{red}{\blacktriangle}$ +1.66 22.99 $\color{red}{\blacktriangle}$ +2.12 48/130
agentlessLineCoverage 40.70 39.45 $\color{red}{\blacktriangle}$ +1.25 39.45 $\color{red}{\blacktriangle}$ +1.25 47/130

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - spring_boot

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 16.19 16.36 $\color{green}{\blacktriangledown}$ -0.17 16.36 $\color{green}{\blacktriangledown}$ -0.17 69/156
agentless 10.35 9.92 $\color{red}{\blacktriangle}$ +0.43 9.92 $\color{red}{\blacktriangle}$ +0.43 45/126
agentlessCodeCoverage 13.92 13.67 $\color{red}{\blacktriangle}$ +0.25 13.67 $\color{red}{\blacktriangle}$ +0.25 45/126
agentlessLineCoverage 22.90 22.54 $\color{red}{\blacktriangle}$ +0.36 22.54 $\color{red}{\blacktriangle}$ +0.36 45/128

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-java

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 8.65 15.41 $\color{green}{\blacktriangledown}$ -6.76 13.40 $\color{green}{\blacktriangledown}$ -4.75 69/168
agentless 46.69 12.87 $\color{red}{\blacktriangle}$ +33.82 11.65 $\color{red}{\blacktriangle}$ +35.04 47/140
agentlessCodeCoverage 118.94 89.58 $\color{red}{\blacktriangle}$ +29.36 77.88 $\color{red}{\blacktriangle}$ +41.06 47/140
agentlessLineCoverage 116.48 123.36 $\color{green}{\blacktriangledown}$ -6.88 120.92 $\color{green}{\blacktriangledown}$ -4.44 44/139

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@daniel-mohedano
daniel-mohedano force-pushed the daniel.mohedano/agentless-logs-log4j1 branch from 0775202 to 0d1b1a6 Compare October 2, 2026 10:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibility Continuous Integration Visibility comp: logs Logs Product tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant