-
Notifications
You must be signed in to change notification settings - Fork 324
Configuration to Disable APM Tracing #8219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration to Disable APM Tracing #8219
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.038 s) : 0, 1038391
Total [baseline] (10.472 s) : 0, 10472130
Agent [candidate] (1.051 s) : 0, 1051214
Total [candidate] (10.533 s) : 0, 10532887
section appsec
Agent [baseline] (1.182 s) : 0, 1181970
Total [baseline] (10.836 s) : 0, 10836415
Agent [candidate] (1.18 s) : 0, 1180326
Total [candidate] (10.755 s) : 0, 10755005
section iast
Agent [baseline] (1.181 s) : 0, 1180592
Total [baseline] (11.058 s) : 0, 11058003
Agent [candidate] (1.173 s) : 0, 1172866
Total [candidate] (11.141 s) : 0, 11140755
section profiling
Agent [baseline] (1.263 s) : 0, 1262620
Total [baseline] (10.901 s) : 0, 10901379
Agent [candidate] (1.262 s) : 0, 1262429
Total [candidate] (10.901 s) : 0, 10901045
gantt
title petclinic - break down per module: candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.684 ms) : 0, 715684
BytebuddyAgent [candidate] (724.348 ms) : 0, 724348
GlobalTracer [baseline] (240.763 ms) : 0, 240763
GlobalTracer [candidate] (243.02 ms) : 0, 243020
AppSec [baseline] (55.145 ms) : 0, 55145
AppSec [candidate] (56.132 ms) : 0, 56132
Remote Config [baseline] (714.67 µs) : 0, 715
Remote Config [candidate] (707.755 µs) : 0, 708
Telemetry [baseline] (10.81 ms) : 0, 10810
Telemetry [candidate] (11.595 ms) : 0, 11595
section appsec
BytebuddyAgent [baseline] (732.805 ms) : 0, 732805
BytebuddyAgent [candidate] (732.964 ms) : 0, 732964
GlobalTracer [baseline] (237.58 ms) : 0, 237580
GlobalTracer [candidate] (236.256 ms) : 0, 236256
IAST [baseline] (21.52 ms) : 0, 21520
IAST [candidate] (21.4 ms) : 0, 21400
AppSec [baseline] (176.647 ms) : 0, 176647
AppSec [candidate] (176.305 ms) : 0, 176305
Remote Config [baseline] (658.824 µs) : 0, 659
Remote Config [candidate] (669.686 µs) : 0, 670
Telemetry [baseline] (8.289 ms) : 0, 8289
Telemetry [candidate] (8.242 ms) : 0, 8242
section iast
BytebuddyAgent [baseline] (842.49 ms) : 0, 842490
BytebuddyAgent [candidate] (836.714 ms) : 0, 836714
GlobalTracer [baseline] (232.968 ms) : 0, 232968
GlobalTracer [candidate] (231.157 ms) : 0, 231157
IAST [baseline] (23.018 ms) : 0, 23018
IAST [candidate] (23.046 ms) : 0, 23046
AppSec [baseline] (57.238 ms) : 0, 57238
AppSec [candidate] (57.314 ms) : 0, 57314
Remote Config [baseline] (629.249 µs) : 0, 629
Remote Config [candidate] (622.28 µs) : 0, 622
Telemetry [baseline] (8.759 ms) : 0, 8759
Telemetry [candidate] (8.687 ms) : 0, 8687
section profiling
BytebuddyAgent [baseline] (707.728 ms) : 0, 707728
BytebuddyAgent [candidate] (708.551 ms) : 0, 708551
GlobalTracer [baseline] (351.111 ms) : 0, 351111
GlobalTracer [candidate] (350.618 ms) : 0, 350618
AppSec [baseline] (55.482 ms) : 0, 55482
AppSec [candidate] (54.874 ms) : 0, 54874
Remote Config [baseline] (702.742 µs) : 0, 703
Remote Config [candidate] (676.139 µs) : 0, 676
Telemetry [baseline] (8.885 ms) : 0, 8885
Telemetry [candidate] (9.053 ms) : 0, 9053
ProfilingAgent [baseline] (96.367 ms) : 0, 96367
ProfilingAgent [candidate] (96.287 ms) : 0, 96287
Profiling [baseline] (96.391 ms) : 0, 96391
Profiling [candidate] (96.312 ms) : 0, 96312
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1043329
Total [baseline] (8.669 s) : 0, 8669234
Agent [candidate] (1.042 s) : 0, 1042446
Total [candidate] (8.662 s) : 0, 8661716
section iast
Agent [baseline] (1.172 s) : 0, 1172037
Total [baseline] (9.323 s) : 0, 9323314
Agent [candidate] (1.186 s) : 0, 1185937
Total [candidate] (9.288 s) : 0, 9288041
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.174 s) : 0, 1173979
Total [baseline] (9.263 s) : 0, 9263306
Agent [candidate] (1.174 s) : 0, 1174329
Total [candidate] (9.26 s) : 0, 9259938
section iast_TELEMETRY_OFF
Agent [baseline] (1.17 s) : 0, 1169995
Total [baseline] (9.266 s) : 0, 9266198
Agent [candidate] (1.174 s) : 0, 1174294
Total [candidate] (9.297 s) : 0, 9297151
gantt
title insecure-bank - break down per module: candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (717.732 ms) : 0, 717732
BytebuddyAgent [candidate] (717.34 ms) : 0, 717340
GlobalTracer [baseline] (241.137 ms) : 0, 241137
GlobalTracer [candidate] (240.525 ms) : 0, 240525
AppSec [baseline] (55.519 ms) : 0, 55519
AppSec [candidate] (55.653 ms) : 0, 55653
Remote Config [baseline] (725.0 µs) : 0, 725
Remote Config [candidate] (708.275 µs) : 0, 708
Telemetry [baseline] (12.974 ms) : 0, 12974
Telemetry [candidate] (13.046 ms) : 0, 13046
section iast
BytebuddyAgent [baseline] (835.941 ms) : 0, 835941
BytebuddyAgent [candidate] (848.529 ms) : 0, 848529
GlobalTracer [baseline] (231.747 ms) : 0, 231747
GlobalTracer [candidate] (231.734 ms) : 0, 231734
IAST [baseline] (22.76 ms) : 0, 22760
IAST [candidate] (22.913 ms) : 0, 22913
AppSec [baseline] (56.968 ms) : 0, 56968
AppSec [candidate] (57.789 ms) : 0, 57789
Remote Config [baseline] (613.169 µs) : 0, 613
Remote Config [candidate] (637.738 µs) : 0, 638
Telemetry [baseline] (8.738 ms) : 0, 8738
Telemetry [candidate] (8.845 ms) : 0, 8845
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (837.16 ms) : 0, 837160
BytebuddyAgent [candidate] (837.618 ms) : 0, 837618
GlobalTracer [baseline] (232.164 ms) : 0, 232164
GlobalTracer [candidate] (231.681 ms) : 0, 231681
IAST [baseline] (22.747 ms) : 0, 22747
IAST [candidate] (22.957 ms) : 0, 22957
AppSec [baseline] (57.178 ms) : 0, 57178
AppSec [candidate] (57.359 ms) : 0, 57359
Remote Config [baseline] (624.072 µs) : 0, 624
Remote Config [candidate] (630.292 µs) : 0, 630
Telemetry [baseline] (8.745 ms) : 0, 8745
Telemetry [candidate] (8.733 ms) : 0, 8733
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (834.1 ms) : 0, 834100
BytebuddyAgent [candidate] (837.367 ms) : 0, 837367
GlobalTracer [baseline] (231.478 ms) : 0, 231478
GlobalTracer [candidate] (232.351 ms) : 0, 232351
IAST [baseline] (26.477 ms) : 0, 26477
IAST [candidate] (24.681 ms) : 0, 24681
AppSec [baseline] (53.319 ms) : 0, 53319
AppSec [candidate] (55.148 ms) : 0, 55148
Remote Config [baseline] (625.314 µs) : 0, 625
Remote Config [candidate] (649.264 µs) : 0, 649
Telemetry [baseline] (8.652 ms) : 0, 8652
Telemetry [candidate] (8.739 ms) : 0, 8739
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section baseline
no_agent (1.367 ms) : 1347, 1387
. : milestone, 1367,
appsec (1.762 ms) : 1738, 1785
. : milestone, 1762,
appsec_no_iast (1.763 ms) : 1735, 1790
. : milestone, 1763,
iast (1.508 ms) : 1483, 1533
. : milestone, 1508,
profiling (1.568 ms) : 1543, 1593
. : milestone, 1568,
tracing (1.506 ms) : 1482, 1530
. : milestone, 1506,
section candidate
no_agent (1.365 ms) : 1346, 1385
. : milestone, 1365,
appsec (1.745 ms) : 1722, 1769
. : milestone, 1745,
appsec_no_iast (1.766 ms) : 1743, 1789
. : milestone, 1766,
iast (1.499 ms) : 1474, 1523
. : milestone, 1499,
profiling (1.519 ms) : 1495, 1542
. : milestone, 1519,
tracing (1.502 ms) : 1477, 1527
. : milestone, 1502,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section baseline
no_agent (381.014 µs) : 361, 401
. : milestone, 381,
iast (524.514 µs) : 503, 546
. : milestone, 525,
iast_FULL (752.115 µs) : 730, 774
. : milestone, 752,
iast_GLOBAL (568.204 µs) : 546, 591
. : milestone, 568,
iast_HARDCODED_SECRET_DISABLED (516.453 µs) : 494, 539
. : milestone, 516,
iast_INACTIVE (472.058 µs) : 450, 494
. : milestone, 472,
iast_TELEMETRY_OFF (499.445 µs) : 478, 521
. : milestone, 499,
tracing (465.893 µs) : 445, 487
. : milestone, 466,
section candidate
no_agent (386.41 µs) : 367, 406
. : milestone, 386,
iast (513.896 µs) : 492, 536
. : milestone, 514,
iast_FULL (753.68 µs) : 732, 776
. : milestone, 754,
iast_GLOBAL (561.454 µs) : 539, 584
. : milestone, 561,
iast_HARDCODED_SECRET_DISABLED (514.949 µs) : 492, 538
. : milestone, 515,
iast_INACTIVE (461.646 µs) : 440, 483
. : milestone, 462,
iast_TELEMETRY_OFF (506.181 µs) : 483, 529
. : milestone, 506,
tracing (468.978 µs) : 447, 491
. : milestone, 469,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (2.372 ms) : 2329, 2416
. : milestone, 2372,
iast (2.116 ms) : 2061, 2171
. : milestone, 2116,
iast_GLOBAL (2.156 ms) : 2101, 2212
. : milestone, 2156,
profiling (1.98 ms) : 1937, 2024
. : milestone, 1980,
tracing (1.95 ms) : 1908, 1992
. : milestone, 1950,
section candidate
no_agent (1.481 ms) : 1469, 1492
. : milestone, 1481,
appsec (2.379 ms) : 2335, 2422
. : milestone, 2379,
iast (2.113 ms) : 2059, 2168
. : milestone, 2113,
iast_GLOBAL (2.154 ms) : 2099, 2209
. : milestone, 2154,
profiling (1.983 ms) : 1940, 2027
. : milestone, 1983,
tracing (1.953 ms) : 1910, 1995
. : milestone, 1953,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~cb9a2d4b0d, baseline=1.47.0-SNAPSHOT~dcf73eb0cb
dateFormat X
axisFormat %s
section baseline
no_agent (15.613 s) : 15613000, 15613000
. : milestone, 15613000,
appsec (14.811 s) : 14811000, 14811000
. : milestone, 14811000,
iast (18.957 s) : 18957000, 18957000
. : milestone, 18957000,
iast_GLOBAL (18.379 s) : 18379000, 18379000
. : milestone, 18379000,
profiling (15.008 s) : 15008000, 15008000
. : milestone, 15008000,
tracing (15.199 s) : 15199000, 15199000
. : milestone, 15199000,
section candidate
no_agent (14.901 s) : 14901000, 14901000
. : milestone, 14901000,
appsec (15.261 s) : 15261000, 15261000
. : milestone, 15261000,
iast (19.095 s) : 19095000, 19095000
. : milestone, 19095000,
iast_GLOBAL (18.109 s) : 18109000, 18109000
. : milestone, 18109000,
profiling (14.96 s) : 14960000, 14960000
. : milestone, 14960000,
tracing (15.382 s) : 15382000, 15382000
. : milestone, 15382000,
|
bfd572e to
33ce3ad
Compare
4188a6d to
1e9bb61
Compare
|
just for my culture, are we switching from apm to asm or just disabling apm? i see code switch between these so it'd be cool for me to get a bit of understanding on what’s going on here, thank you! |
Last year, due to ASM business needs, it became necessary to configure the tracer to work without APM. For various reasons (a long story—almost a year passed between the first RFC and the implementation! 😄), an ad-hoc implementation was chosen specifically for ASM, known as ASM Standalone Billing. With the new RFC, the goal is to provide a more generic way to disable APM, allowing not only ASM but also other products to operate independently. If you still have any questions or need more details, we can discuss them offline. |
dd-trace-core/src/main/java/datadog/trace/core/propagation/ptags/PTagsFactory.java
Outdated
Show resolved
Hide resolved
manuel-alvarez-alvarez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (provided that the required system-tests are passing)
cc5dd28 to
a519cba
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good improvement 👍 Left a bunch of comments 😅
dd-trace-core/src/main/java/datadog/trace/common/sampling/ApmTracingDisabledSampler.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/ptags/PTagsCodec.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/ptags/PTagsCodec.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/ptags/PTagsCodec.java
Outdated
Show resolved
Hide resolved
internal-api/src/test/groovy/datadog/trace/api/ProductTraceSourceTest.groovy
Outdated
Show resolved
Hide resolved
internal-api/src/test/groovy/datadog/trace/api/ProductTraceSourceTest.groovy
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/PropagationTags.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/PropagationTags.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/propagation/ptags/PTagsFactory.java
Outdated
Show resolved
Hide resolved
Mariovido
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as the tests are passing and everything seems good, but I am not an expert in the topic.
2a13398 to
dc55a60
Compare
4dea16f to
0ff5dfb
Compare
move cast to TagInterceptor instead of doing it on DDSpanContext
…atadogPropagationTagsTest.groovy Co-authored-by: Bruce Bujon <PerfectSlayer@users.noreply.github.com>
This reverts commit 3ec5d83.
This reverts commit 5dc237b.
This reverts commit 289a048.
This reverts commit 449d681.
…exadecimal string and be able to parse masks of at least 32 bits to ensure forward compatibility
…ed and appsec/iast are enabled
f2e3461 to
b5f1b22
Compare
Thank you for taking the time to review this! 😊 |
What Does This Do
DD_EXPERIMENTAL_APPSEC_ENABLED = trueforDD_APM_TRACING_ENABLED = falseAsmStandaloneSamplershould be use when APM tracing is disabled, so it's renamed toApmTracingDisabledSampler_dd.p.appsec = 1when there is an ASM event for a a two-character-long hex string_dd.p.tsProduct Trace Source values:
Motivation
Migration from the experimental asm standalone billing to APM Disabling tracing
Additional Notes
RFC
Migration Guide
Testested in system-tests
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APPSEC-56438