Skip to content

Support DD_LOG_LEVEL#7159

Merged
mcculls merged 1 commit into
masterfrom
mcculls/support-dd_log_level
Jun 11, 2024
Merged

Support DD_LOG_LEVEL#7159
mcculls merged 1 commit into
masterfrom
mcculls/support-dd_log_level

Conversation

@mcculls

@mcculls mcculls commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

What Does This Do

Users can now configure the tracer's log level by setting DD_LOG_LEVEL in their environment:

DD_LOG_LEVEL=WARN

They can also use the -Ddd.log.level JVM option

Motivation

Make it easier to apply a tracer log level for all Java tracers running in the same environment.

Additional Notes

DD_TRACE_DEBUG=true implies a log level of DEBUG, but DD_LOG_LEVEL=DEBUG does not imply DD_TRACE_DEBUG is enabled.

Jira ticket: AIT-9801

Note that DD_TRACE_DEBUG=true implies a log level of DEBUG, but DD_LOG_LEVEL=DEBUG does not imply DD_TRACE_DEBUG is enabled.
@mcculls mcculls added the comp: logging Tracer internal logging label Jun 11, 2024
@mcculls
mcculls requested review from a team as code owners June 11, 2024 10:54
@mcculls
mcculls requested review from am312 and dougqh June 11, 2024 10:54
@pr-commenter

pr-commenter Bot commented Jun 11, 2024

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/support-dd_log_level
git_commit_date 1718102392 1718102859
git_commit_sha 5ba28c1 714d484
release_version 1.36.0-SNAPSHOT~5ba28c1108 1.36.0-SNAPSHOT~714d4849a7
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1718105848 1718105848
ci_job_id 538940604 538940604
ci_pipeline_id 36379553 36379553
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 18 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.077 s) : 0, 1076957
Total [baseline] (10.452 s) : 0, 10452201
Agent [candidate] (1.059 s) : 0, 1059489
Total [candidate] (10.362 s) : 0, 10361729
section appsec
Agent [baseline] (1.181 s) : 0, 1181195
Total [baseline] (10.543 s) : 0, 10542667
Agent [candidate] (1.177 s) : 0, 1176739
Total [candidate] (10.541 s) : 0, 10540701
section iast
Agent [baseline] (1.178 s) : 0, 1177959
Total [baseline] (10.779 s) : 0, 10779016
Agent [candidate] (1.168 s) : 0, 1168339
Total [candidate] (10.748 s) : 0, 10747852
section profiling
Agent [baseline] (1.264 s) : 0, 1263983
Total [baseline] (10.714 s) : 0, 10714088
Agent [candidate] (1.259 s) : 0, 1258567
Total [candidate] (10.741 s) : 0, 10741312
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.077 s -
Agent appsec 1.181 s 104.238 ms (9.7%)
Agent iast 1.178 s 101.002 ms (9.4%)
Agent profiling 1.264 s 187.026 ms (17.4%)
Total tracing 10.452 s -
Total appsec 10.543 s 90.465 ms (0.9%)
Total iast 10.779 s 326.814 ms (3.1%)
Total profiling 10.714 s 261.886 ms (2.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.177 s 117.251 ms (11.1%)
Agent iast 1.168 s 108.851 ms (10.3%)
Agent profiling 1.259 s 199.078 ms (18.8%)
Total tracing 10.362 s -
Total appsec 10.541 s 178.972 ms (1.7%)
Total iast 10.748 s 386.123 ms (3.7%)
Total profiling 10.741 s 379.583 ms (3.7%)
gantt
    title petclinic - break down per module: candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (674.099 ms) : 0, 674099
BytebuddyAgent [candidate] (663.592 ms) : 0, 663592
GlobalTracer [baseline] (308.047 ms) : 0, 308047
GlobalTracer [candidate] (303.137 ms) : 0, 303137
AppSec [baseline] (50.969 ms) : 0, 50969
AppSec [candidate] (49.913 ms) : 0, 49913
Logs Intake [baseline] (427.721 µs) : 0, 428
Logs Intake [candidate] (391.562 µs) : 0, 392
Remote Config [baseline] (672.148 µs) : 0, 672
Remote Config [candidate] (675.732 µs) : 0, 676
Telemetry [baseline] (7.753 ms) : 0, 7753
Telemetry [candidate] (7.537 ms) : 0, 7537
section appsec
BytebuddyAgent [baseline] (675.325 ms) : 0, 675325
BytebuddyAgent [candidate] (673.875 ms) : 0, 673875
GlobalTracer [baseline] (297.458 ms) : 0, 297458
GlobalTracer [candidate] (297.065 ms) : 0, 297065
AppSec [baseline] (152.928 ms) : 0, 152928
AppSec [candidate] (152.802 ms) : 0, 152802
Logs Intake [baseline] (332.164 µs) : 0, 332
Logs Intake [candidate] (332.515 µs) : 0, 333
Remote Config [baseline] (645.737 µs) : 0, 646
Remote Config [candidate] (618.161 µs) : 0, 618
Telemetry [baseline] (9.025 ms) : 0, 9025
Telemetry [candidate] (7.798 ms) : 0, 7798
IAST [baseline] (22.148 ms) : 0, 22148
IAST [candidate] (19.823 ms) : 0, 19823
section iast
BytebuddyAgent [baseline] (784.265 ms) : 0, 784265
BytebuddyAgent [candidate] (782.19 ms) : 0, 782190
GlobalTracer [baseline] (297.498 ms) : 0, 297498
GlobalTracer [candidate] (293.021 ms) : 0, 293021
AppSec [baseline] (47.717 ms) : 0, 47717
AppSec [candidate] (46.709 ms) : 0, 46709
Logs Intake [baseline] (303.102 µs) : 0, 303
Logs Intake [candidate] (300.265 µs) : 0, 300
Remote Config [baseline] (590.932 µs) : 0, 591
Remote Config [candidate] (577.34 µs) : 0, 577
Telemetry [baseline] (9.27 ms) : 0, 9270
Telemetry [candidate] (6.908 ms) : 0, 6908
IAST [baseline] (24.951 ms) : 0, 24951
IAST [candidate] (25.292 ms) : 0, 25292
section profiling
ProfilingAgent [baseline] (96.809 ms) : 0, 96809
ProfilingAgent [candidate] (95.684 ms) : 0, 95684
BytebuddyAgent [baseline] (662.009 ms) : 0, 662009
BytebuddyAgent [candidate] (661.636 ms) : 0, 661636
GlobalTracer [baseline] (388.67 ms) : 0, 388670
GlobalTracer [candidate] (385.839 ms) : 0, 385839
AppSec [baseline] (51.509 ms) : 0, 51509
AppSec [candidate] (50.466 ms) : 0, 50466
Logs Intake [baseline] (338.073 µs) : 0, 338
Logs Intake [candidate] (338.854 µs) : 0, 339
Remote Config [baseline] (749.348 µs) : 0, 749
Remote Config [candidate] (737.712 µs) : 0, 738
Telemetry [baseline] (7.387 ms) : 0, 7387
Telemetry [candidate] (7.359 ms) : 0, 7359
Profiling [baseline] (96.834 ms) : 0, 96834
Profiling [candidate] (95.708 ms) : 0, 95708
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.069 s) : 0, 1068747
Total [baseline] (8.592 s) : 0, 8592172
Agent [candidate] (1.062 s) : 0, 1061744
Total [candidate] (8.563 s) : 0, 8562847
section iast
Agent [baseline] (1.167 s) : 0, 1166749
Total [baseline] (9.037 s) : 0, 9036844
Agent [candidate] (1.177 s) : 0, 1176767
Total [candidate] (9.074 s) : 0, 9074452
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.166 s) : 0, 1166215
Total [baseline] (8.962 s) : 0, 8962013
Agent [candidate] (1.169 s) : 0, 1168711
Total [candidate] (8.969 s) : 0, 8969111
section iast_TELEMETRY_OFF
Agent [baseline] (1.166 s) : 0, 1165697
Total [baseline] (9.046 s) : 0, 9046318
Agent [candidate] (1.181 s) : 0, 1181292
Total [candidate] (9.024 s) : 0, 9024064
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.069 s -
Agent iast 1.167 s 98.002 ms (9.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.166 s 97.468 ms (9.1%)
Agent iast_TELEMETRY_OFF 1.166 s 96.95 ms (9.1%)
Total tracing 8.592 s -
Total iast 9.037 s 444.672 ms (5.2%)
Total iast_HARDCODED_SECRET_DISABLED 8.962 s 369.842 ms (4.3%)
Total iast_TELEMETRY_OFF 9.046 s 454.146 ms (5.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent iast 1.177 s 115.023 ms (10.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.169 s 106.967 ms (10.1%)
Agent iast_TELEMETRY_OFF 1.181 s 119.548 ms (11.3%)
Total tracing 8.563 s -
Total iast 9.074 s 511.606 ms (6.0%)
Total iast_HARDCODED_SECRET_DISABLED 8.969 s 406.264 ms (4.7%)
Total iast_TELEMETRY_OFF 9.024 s 461.217 ms (5.4%)
gantt
    title insecure-bank - break down per module: candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (669.438 ms) : 0, 669438
BytebuddyAgent [candidate] (664.35 ms) : 0, 664350
GlobalTracer [baseline] (305.564 ms) : 0, 305564
GlobalTracer [candidate] (303.971 ms) : 0, 303971
AppSec [baseline] (50.419 ms) : 0, 50419
AppSec [candidate] (50.316 ms) : 0, 50316
Logs Intake [baseline] (388.435 µs) : 0, 388
Logs Intake [candidate] (407.168 µs) : 0, 407
Remote Config [baseline] (676.965 µs) : 0, 677
Remote Config [candidate] (662.769 µs) : 0, 663
Telemetry [baseline] (7.609 ms) : 0, 7609
Telemetry [candidate] (7.601 ms) : 0, 7601
section iast
BytebuddyAgent [baseline] (776.994 ms) : 0, 776994
BytebuddyAgent [candidate] (784.955 ms) : 0, 784955
GlobalTracer [baseline] (292.999 ms) : 0, 292999
GlobalTracer [candidate] (295.65 ms) : 0, 295650
AppSec [baseline] (46.852 ms) : 0, 46852
AppSec [candidate] (47.067 ms) : 0, 47067
IAST [baseline] (27.29 ms) : 0, 27290
IAST [candidate] (26.283 ms) : 0, 26283
Logs Intake [baseline] (300.973 µs) : 0, 301
Logs Intake [candidate] (298.977 µs) : 0, 299
Remote Config [baseline] (569.731 µs) : 0, 570
Remote Config [candidate] (580.346 µs) : 0, 580
Telemetry [baseline] (8.497 ms) : 0, 8497
Telemetry [candidate] (8.552 ms) : 0, 8552
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (777.56 ms) : 0, 777560
BytebuddyAgent [candidate] (779.084 ms) : 0, 779084
GlobalTracer [baseline] (293.391 ms) : 0, 293391
GlobalTracer [candidate] (293.906 ms) : 0, 293906
AppSec [baseline] (46.522 ms) : 0, 46522
AppSec [candidate] (46.918 ms) : 0, 46918
IAST [baseline] (26.189 ms) : 0, 26189
IAST [candidate] (25.393 ms) : 0, 25393
Logs Intake [baseline] (300.026 µs) : 0, 300
Logs Intake [candidate] (301.249 µs) : 0, 301
Remote Config [baseline] (569.717 µs) : 0, 570
Remote Config [candidate] (577.197 µs) : 0, 577
Telemetry [baseline] (8.38 ms) : 0, 8380
Telemetry [candidate] (9.159 ms) : 0, 9159
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (776.365 ms) : 0, 776365
BytebuddyAgent [candidate] (787.369 ms) : 0, 787369
GlobalTracer [baseline] (293.831 ms) : 0, 293831
GlobalTracer [candidate] (297.339 ms) : 0, 297339
AppSec [baseline] (48.761 ms) : 0, 48761
AppSec [candidate] (50.178 ms) : 0, 50178
IAST [baseline] (24.173 ms) : 0, 24173
IAST [candidate] (23.68 ms) : 0, 23680
Logs Intake [baseline] (300.846 µs) : 0, 301
Logs Intake [candidate] (304.174 µs) : 0, 304
Remote Config [baseline] (558.326 µs) : 0, 558
Remote Config [candidate] (590.978 µs) : 0, 591
Telemetry [baseline] (8.414 ms) : 0, 8414
Telemetry [candidate] (8.294 ms) : 0, 8294
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-06-11T11:08:19 2024-06-11T11:15:10
git_branch master mcculls/support-dd_log_level
git_commit_date 1718102392 1718102859
git_commit_sha 5ba28c1 714d484
release_version 1.36.0-SNAPSHOT~5ba28c1108 1.36.0-SNAPSHOT~714d4849a7
start_time 2024-06-11T11:08:06 2024-06-11T11:14:56
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1718104854 1718104854
ci_job_id 538940605 538940605
ci_pipeline_id 36379553 36379553
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

Found 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 16 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:petclinic:profiling better
[-95.456µs; -41.945µs] or [-6.138%; -2.697%]
unstable
[-489.070op/s; +716.990op/s] or [-16.506%; +24.198%]
1.487ms 3076.923op/s 1.555ms 2962.963op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108
    dateFormat X
    axisFormat %s
section baseline
no_agent (369.985 µs) : 351, 389
.   : milestone, 370,
iast (481.782 µs) : 460, 503
.   : milestone, 482,
iast_FULL (554.873 µs) : 534, 576
.   : milestone, 555,
iast_GLOBAL (515.18 µs) : 493, 537
.   : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (484.548 µs) : 463, 506
.   : milestone, 485,
iast_INACTIVE (453.533 µs) : 432, 475
.   : milestone, 454,
iast_TELEMETRY_OFF (476.26 µs) : 455, 498
.   : milestone, 476,
tracing (441.635 µs) : 421, 462
.   : milestone, 442,
section candidate
no_agent (369.436 µs) : 350, 389
.   : milestone, 369,
iast (487.678 µs) : 467, 509
.   : milestone, 488,
iast_FULL (550.876 µs) : 530, 572
.   : milestone, 551,
iast_GLOBAL (507.571 µs) : 486, 529
.   : milestone, 508,
iast_HARDCODED_SECRET_DISABLED (478.889 µs) : 458, 500
.   : milestone, 479,
iast_INACTIVE (455.537 µs) : 434, 477
.   : milestone, 456,
iast_TELEMETRY_OFF (476.182 µs) : 455, 498
.   : milestone, 476,
tracing (440.758 µs) : 420, 461
.   : milestone, 441,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 369.985 µs [350.73 µs, 389.24 µs] -
iast 481.782 µs [460.448 µs, 503.115 µs] 111.797 µs (30.2%)
iast_FULL 554.873 µs [533.715 µs, 576.031 µs] 184.888 µs (50.0%)
iast_GLOBAL 515.18 µs [493.003 µs, 537.357 µs] 145.195 µs (39.2%)
iast_HARDCODED_SECRET_DISABLED 484.548 µs [462.823 µs, 506.272 µs] 114.563 µs (31.0%)
iast_INACTIVE 453.533 µs [431.779 µs, 475.286 µs] 83.548 µs (22.6%)
iast_TELEMETRY_OFF 476.26 µs [454.969 µs, 497.551 µs] 106.275 µs (28.7%)
tracing 441.635 µs [421.418 µs, 461.853 µs] 71.65 µs (19.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 369.436 µs [349.983 µs, 388.89 µs] -
iast 487.678 µs [466.679 µs, 508.676 µs] 118.242 µs (32.0%)
iast_FULL 550.876 µs [529.619 µs, 572.132 µs] 181.439 µs (49.1%)
iast_GLOBAL 507.571 µs [486.145 µs, 528.997 µs] 138.135 µs (37.4%)
iast_HARDCODED_SECRET_DISABLED 478.889 µs [457.749 µs, 500.028 µs] 109.453 µs (29.6%)
iast_INACTIVE 455.537 µs [434.233 µs, 476.84 µs] 86.1 µs (23.3%)
iast_TELEMETRY_OFF 476.182 µs [454.757 µs, 497.607 µs] 106.746 µs (28.9%)
tracing 440.758 µs [420.328 µs, 461.188 µs] 71.322 µs (19.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.341 ms) : 1321, 1361
.   : milestone, 1341,
appsec (1.739 ms) : 1712, 1765
.   : milestone, 1739,
appsec_no_iast (1.718 ms) : 1693, 1742
.   : milestone, 1718,
iast (1.47 ms) : 1447, 1493
.   : milestone, 1470,
profiling (1.555 ms) : 1529, 1581
.   : milestone, 1555,
tracing (1.448 ms) : 1424, 1472
.   : milestone, 1448,
section candidate
no_agent (1.355 ms) : 1334, 1375
.   : milestone, 1355,
appsec (1.73 ms) : 1706, 1754
.   : milestone, 1730,
appsec_no_iast (1.718 ms) : 1693, 1742
.   : milestone, 1718,
iast (1.483 ms) : 1459, 1508
.   : milestone, 1483,
profiling (1.487 ms) : 1463, 1510
.   : milestone, 1487,
tracing (1.46 ms) : 1435, 1484
.   : milestone, 1460,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.341 ms [1.321 ms, 1.361 ms] -
appsec 1.739 ms [1.712 ms, 1.765 ms] 397.409 µs (29.6%)
appsec_no_iast 1.718 ms [1.693 ms, 1.742 ms] 376.278 µs (28.1%)
iast 1.47 ms [1.447 ms, 1.493 ms] 128.809 µs (9.6%)
profiling 1.555 ms [1.529 ms, 1.581 ms] 214.048 µs (16.0%)
tracing 1.448 ms [1.424 ms, 1.472 ms] 106.763 µs (8.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.355 ms [1.334 ms, 1.375 ms] -
appsec 1.73 ms [1.706 ms, 1.754 ms] 375.476 µs (27.7%)
appsec_no_iast 1.718 ms [1.693 ms, 1.742 ms] 362.994 µs (26.8%)
iast 1.483 ms [1.459 ms, 1.508 ms] 128.893 µs (9.5%)
profiling 1.487 ms [1.463 ms, 1.51 ms] 132.069 µs (9.8%)
tracing 1.46 ms [1.435 ms, 1.484 ms] 105.386 µs (7.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/support-dd_log_level
git_commit_date 1718102392 1718102859
git_commit_sha 5ba28c1 714d484
release_version 1.36.0-SNAPSHOT~5ba28c1108 1.36.0-SNAPSHOT~714d4849a7
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1718105347 1718105347
ci_job_id 538940606 538940606
ci_pipeline_id 36379553 36379553
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.472 ms) : 1460, 1483
.   : milestone, 1472,
appsec (2.203 ms) : 2169, 2237
.   : milestone, 2203,
iast (1.958 ms) : 1917, 1998
.   : milestone, 1958,
iast_GLOBAL (2.009 ms) : 1969, 2050
.   : milestone, 2009,
profiling (1.856 ms) : 1823, 1890
.   : milestone, 1856,
tracing (1.839 ms) : 1807, 1871
.   : milestone, 1839,
section candidate
no_agent (1.466 ms) : 1454, 1477
.   : milestone, 1466,
appsec (2.209 ms) : 2174, 2244
.   : milestone, 2209,
iast (1.974 ms) : 1933, 2015
.   : milestone, 1974,
iast_GLOBAL (2.008 ms) : 1967, 2049
.   : milestone, 2008,
profiling (1.869 ms) : 1835, 1902
.   : milestone, 1869,
tracing (1.841 ms) : 1808, 1874
.   : milestone, 1841,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.46 ms, 1.483 ms] -
appsec 2.203 ms [2.169 ms, 2.237 ms] 731.126 µs (49.7%)
iast 1.958 ms [1.917 ms, 1.998 ms] 486.203 µs (33.0%)
iast_GLOBAL 2.009 ms [1.969 ms, 2.05 ms] 537.826 µs (36.5%)
profiling 1.856 ms [1.823 ms, 1.89 ms] 384.7 µs (26.1%)
tracing 1.839 ms [1.807 ms, 1.871 ms] 367.258 µs (25.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.466 ms [1.454 ms, 1.477 ms] -
appsec 2.209 ms [2.174 ms, 2.244 ms] 742.919 µs (50.7%)
iast 1.974 ms [1.933 ms, 2.015 ms] 508.597 µs (34.7%)
iast_GLOBAL 2.008 ms [1.967 ms, 2.049 ms] 542.323 µs (37.0%)
profiling 1.869 ms [1.835 ms, 1.902 ms] 402.825 µs (27.5%)
tracing 1.841 ms [1.808 ms, 1.874 ms] 375.188 µs (25.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~714d4849a7, baseline=1.36.0-SNAPSHOT~5ba28c1108
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.328 s) : 15328000, 15328000
.   : milestone, 15328000,
appsec (14.997 s) : 14997000, 14997000
.   : milestone, 14997000,
iast (18.71 s) : 18710000, 18710000
.   : milestone, 18710000,
iast_GLOBAL (17.61 s) : 17610000, 17610000
.   : milestone, 17610000,
profiling (15.319 s) : 15319000, 15319000
.   : milestone, 15319000,
tracing (15.15 s) : 15150000, 15150000
.   : milestone, 15150000,
section candidate
no_agent (15.091 s) : 15091000, 15091000
.   : milestone, 15091000,
appsec (15.057 s) : 15057000, 15057000
.   : milestone, 15057000,
iast (18.807 s) : 18807000, 18807000
.   : milestone, 18807000,
iast_GLOBAL (17.76 s) : 17760000, 17760000
.   : milestone, 17760000,
profiling (15.518 s) : 15518000, 15518000
.   : milestone, 15518000,
tracing (15.008 s) : 15008000, 15008000
.   : milestone, 15008000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.328 s [15.328 s, 15.328 s] -
appsec 14.997 s [14.997 s, 14.997 s] -331.0 ms (-2.2%)
iast 18.71 s [18.71 s, 18.71 s] 3.382 s (22.1%)
iast_GLOBAL 17.61 s [17.61 s, 17.61 s] 2.282 s (14.9%)
profiling 15.319 s [15.319 s, 15.319 s] -9.0 ms (-0.1%)
tracing 15.15 s [15.15 s, 15.15 s] -178.0 ms (-1.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.091 s [15.091 s, 15.091 s] -
appsec 15.057 s [15.057 s, 15.057 s] -34.0 ms (-0.2%)
iast 18.807 s [18.807 s, 18.807 s] 3.716 s (24.6%)
iast_GLOBAL 17.76 s [17.76 s, 17.76 s] 2.669 s (17.7%)
profiling 15.518 s [15.518 s, 15.518 s] 427.0 ms (2.8%)
tracing 15.008 s [15.008 s, 15.008 s] -83.0 ms (-0.5%)

@mcculls
mcculls merged commit a6f130d into master Jun 11, 2024
@mcculls
mcculls deleted the mcculls/support-dd_log_level branch June 11, 2024 12:40
@github-actions github-actions Bot added this to the 1.36.0 milestone Jun 11, 2024
@mcculls mcculls mentioned this pull request Jun 12, 2024
mcculls added a commit that referenced this pull request Jun 12, 2024
Note that DD_TRACE_DEBUG=true implies a log level of DEBUG, but DD_LOG_LEVEL=DEBUG does not imply DD_TRACE_DEBUG is enabled.
wantsui added a commit to DataDog/dd-trace-py that referenced this pull request Jan 27, 2026
#16174)

## Description

<!-- Provide an overview of the change and motivation for the change -->

Today, the ddtrace logger follows the root logger.

If the root logger is in DEBUG mode, then ddtrace will also emit logs
and the only way to override that is to set something like this:
https://docs.datadoghq.com/tracing/troubleshooting/tracer_debug_logs/?tab=python#review-debug-logs
```
import logging

# root logger configuration
root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)

# override the ddtrace configuration to WARNING log level
logging.getLogger("ddtrace").setLevel(logging.WARNING)
```

This change introduces a DD_TRACE_LOG_LEVEL setting that follows the
logging levels in the logging module:
https://docs.python.org/3/library/logging.html#levels .

`DD_TRACE_DEBUG` will take precedence if set and set the tracer to
debug. However, if DD_TRACE_LOG_LEVEL is used as a standalone, it can
control the ddtrace logger setting.

Example `DD_TRACE_LOG_LEVEL=CRITICAL` to only get critical logs instead
of everything.

In startup logs, I have the setting report as `log_level_override` to
avoid confusion with the debug mode option someone may be trying to set:
```
- DATADOG TRACER CONFIGURATION - {... 'debug': True, ..... 'log_level_override': None}
```

Addresses APMS-18427

## Testing

<!-- Describe your testing strategy or note what tests are included -->

Added tests that assert on the order of DD_TRACE_DEBUG and
DD_TRACE_LOG_LEVEL .

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

There really isn't a true "NO LOGS" setting if we follow these [logging
levels](https://docs.python.org/3/library/logging.html#levels), so if we
accept this PR, we need to avoid setting any critical logs unless it's
an exceptional use case.

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

There have been various changes to how debug mode can be set over the
years. Some questions I think will be asked of the reviewers and here's
my answer:

1. Do other tracers have this setting?
Yes.
Java has DD_LOG_LEVEL:
DataDog/dd-trace-java#7159
Node.js has DD_TRACE_LOG_LEVEL:
DataDog/dd-trace-js#727

2. If DD_TRACE_DEBUG=debug, how is it different than setting
DD_TRACE_LOG_LEVEL=debug? Won't they have the same problems?

All DD_TRACE_DEBUG does today is enables debug mode if the user sets it
to TRUE:
https://github.com/DataDog/dd-trace-py/blob/c173a8a084b0f7f2a8cd081dbf9611208faa48e0/ddtrace/_logger.py#L53-L54.

Setting it to "FALSE" has no effect if the root logger has already been
configured.

**DD_TRACE_LOG_LEVEL** is different in the sense that it allows us to
override the log level setting beyond accepting DEBUG mode or accepting
whatever the root logger's level was.

---------

Co-authored-by: Munir Abdinur <[email protected]>
Co-authored-by: Quinna Halim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: logging Tracer internal logging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants