-
Notifications
You must be signed in to change notification settings - Fork 312
Add telemetry for the RUM injector #9267
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
Add telemetry for the RUM injector #9267
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.052 s) : 0, 1051571
Total [baseline] (8.668 s) : 0, 8667699
Agent [candidate] (1.051 s) : 0, 1051243
Total [candidate] (8.652 s) : 0, 8651882
section iast
Agent [baseline] (1.201 s) : 0, 1200998
Total [baseline] (9.395 s) : 0, 9394589
Agent [candidate] (1.182 s) : 0, 1182393
Total [candidate] (9.336 s) : 0, 9335893
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (736.502 ms) : 0, 736502
BytebuddyAgent [candidate] (736.823 ms) : 0, 736823
GlobalTracer [baseline] (243.819 ms) : 0, 243819
GlobalTracer [candidate] (242.808 ms) : 0, 242808
AppSec [baseline] (30.271 ms) : 0, 30271
AppSec [candidate] (30.032 ms) : 0, 30032
Debugger [baseline] (6.11 ms) : 0, 6110
Debugger [candidate] (6.03 ms) : 0, 6030
Remote Config [baseline] (672.375 µs) : 0, 672
Remote Config [candidate] (660.973 µs) : 0, 661
Telemetry [baseline] (10.912 ms) : 0, 10912
Telemetry [candidate] (12.276 ms) : 0, 12276
section iast
crashtracking [baseline] (1.492 ms) : 0, 1492
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (868.458 ms) : 0, 868458
BytebuddyAgent [candidate] (853.106 ms) : 0, 853106
GlobalTracer [baseline] (236.069 ms) : 0, 236069
GlobalTracer [candidate] (233.957 ms) : 0, 233957
AppSec [baseline] (27.895 ms) : 0, 27895
AppSec [candidate] (27.834 ms) : 0, 27834
Debugger [baseline] (6.664 ms) : 0, 6664
Debugger [candidate] (5.799 ms) : 0, 5799
Remote Config [baseline] (606.786 µs) : 0, 607
Remote Config [candidate] (617.742 µs) : 0, 618
Telemetry [baseline] (8.463 ms) : 0, 8463
Telemetry [candidate] (8.489 ms) : 0, 8489
IAST [baseline] (30.024 ms) : 0, 30024
IAST [candidate] (30.094 ms) : 0, 30094
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1049804
Total [baseline] (10.706 s) : 0, 10706013
Agent [candidate] (1.047 s) : 0, 1047239
Total [candidate] (10.791 s) : 0, 10790805
section appsec
Agent [baseline] (1.231 s) : 0, 1231180
Total [baseline] (10.9 s) : 0, 10899853
Agent [candidate] (1.233 s) : 0, 1233491
Total [candidate] (10.868 s) : 0, 10868119
section iast
Agent [baseline] (1.192 s) : 0, 1192214
Total [baseline] (10.956 s) : 0, 10956312
Agent [candidate] (1.191 s) : 0, 1191286
Total [candidate] (10.985 s) : 0, 10985124
section profiling
Agent [baseline] (1.21 s) : 0, 1209699
Total [baseline] (11.134 s) : 0, 11133911
Agent [candidate] (1.197 s) : 0, 1196764
Total [candidate] (10.977 s) : 0, 10977017
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.446 ms) : 0, 1446
BytebuddyAgent [baseline] (733.924 ms) : 0, 733924
BytebuddyAgent [candidate] (732.535 ms) : 0, 732535
GlobalTracer [baseline] (243.283 ms) : 0, 243283
GlobalTracer [candidate] (242.955 ms) : 0, 242955
AppSec [baseline] (30.107 ms) : 0, 30107
AppSec [candidate] (30.206 ms) : 0, 30206
Debugger [baseline] (6.086 ms) : 0, 6086
Debugger [candidate] (6.124 ms) : 0, 6124
Remote Config [baseline] (698.303 µs) : 0, 698
Remote Config [candidate] (662.761 µs) : 0, 663
Telemetry [baseline] (13.039 ms) : 0, 13039
Telemetry [candidate] (12.239 ms) : 0, 12239
section appsec
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (760.865 ms) : 0, 760865
BytebuddyAgent [candidate] (762.453 ms) : 0, 762453
GlobalTracer [baseline] (237.166 ms) : 0, 237166
GlobalTracer [candidate] (237.752 ms) : 0, 237752
IAST [baseline] (23.951 ms) : 0, 23951
IAST [candidate] (23.846 ms) : 0, 23846
AppSec [baseline] (171.64 ms) : 0, 171640
AppSec [candidate] (169.655 ms) : 0, 169655
Debugger [baseline] (5.725 ms) : 0, 5725
Debugger [candidate] (7.208 ms) : 0, 7208
Remote Config [baseline] (628.851 µs) : 0, 629
Remote Config [candidate] (629.176 µs) : 0, 629
Telemetry [baseline] (8.429 ms) : 0, 8429
Telemetry [candidate] (9.192 ms) : 0, 9192
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (860.967 ms) : 0, 860967
BytebuddyAgent [candidate] (859.95 ms) : 0, 859950
GlobalTracer [baseline] (235.212 ms) : 0, 235212
GlobalTracer [candidate] (235.233 ms) : 0, 235233
IAST [baseline] (29.613 ms) : 0, 29613
IAST [candidate] (29.965 ms) : 0, 29965
AppSec [baseline] (27.861 ms) : 0, 27861
AppSec [candidate] (27.744 ms) : 0, 27744
Debugger [baseline] (6.69 ms) : 0, 6690
Debugger [candidate] (6.633 ms) : 0, 6633
Remote Config [baseline] (615.418 µs) : 0, 615
Remote Config [candidate] (623.917 µs) : 0, 624
Telemetry [baseline] (8.502 ms) : 0, 8502
Telemetry [candidate] (8.426 ms) : 0, 8426
section profiling
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.433 ms) : 0, 1433
BytebuddyAgent [baseline] (770.045 ms) : 0, 770045
BytebuddyAgent [candidate] (761.677 ms) : 0, 761677
GlobalTracer [baseline] (224.323 ms) : 0, 224323
GlobalTracer [candidate] (222.638 ms) : 0, 222638
AppSec [baseline] (30.375 ms) : 0, 30375
AppSec [candidate] (30.134 ms) : 0, 30134
Debugger [baseline] (6.32 ms) : 0, 6320
Debugger [candidate] (6.302 ms) : 0, 6302
Remote Config [baseline] (726.212 µs) : 0, 726
Remote Config [candidate] (727.627 µs) : 0, 728
Telemetry [baseline] (15.814 ms) : 0, 15814
Telemetry [candidate] (16.273 ms) : 0, 16273
ProfilingAgent [baseline] (110.585 ms) : 0, 110585
ProfilingAgent [candidate] (107.984 ms) : 0, 107984
Profiling [baseline] (111.255 ms) : 0, 111255
Profiling [candidate] (108.625 ms) : 0, 108625
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section baseline
no_agent (39.016 ms) : 38693, 39340
. : milestone, 39016,
appsec (49.065 ms) : 48620, 49509
. : milestone, 49065,
code_origins (46.527 ms) : 46125, 46929
. : milestone, 46527,
iast (46.083 ms) : 45685, 46482
. : milestone, 46083,
profiling (50.047 ms) : 49598, 50496
. : milestone, 50047,
tracing (45.073 ms) : 44681, 45465
. : milestone, 45073,
section candidate
no_agent (37.867 ms) : 37567, 38166
. : milestone, 37867,
appsec (47.413 ms) : 46994, 47832
. : milestone, 47413,
code_origins (46.323 ms) : 45942, 46705
. : milestone, 46323,
iast (47.647 ms) : 47231, 48063
. : milestone, 47647,
profiling (49.301 ms) : 48813, 49789
. : milestone, 49301,
tracing (45.974 ms) : 45570, 46379
. : milestone, 45974,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section baseline
no_agent (4.68 ms) : 4621, 4738
. : milestone, 4680,
iast (9.987 ms) : 9815, 10159
. : milestone, 9987,
iast_FULL (15.357 ms) : 15041, 15673
. : milestone, 15357,
iast_GLOBAL (11.145 ms) : 10943, 11347
. : milestone, 11145,
profiling (9.527 ms) : 9383, 9671
. : milestone, 9527,
tracing (7.912 ms) : 7793, 8030
. : milestone, 7912,
section candidate
no_agent (4.673 ms) : 4619, 4727
. : milestone, 4673,
iast (9.691 ms) : 9534, 9848
. : milestone, 9691,
iast_FULL (15.004 ms) : 14706, 15301
. : milestone, 15004,
iast_GLOBAL (11.24 ms) : 11022, 11459
. : milestone, 11240,
profiling (9.341 ms) : 9197, 9486
. : milestone, 9341,
tracing (8.305 ms) : 8177, 8433
. : milestone, 8305,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section baseline
no_agent (1.48 ms) : 1469, 1492
. : milestone, 1480,
appsec (3.659 ms) : 3441, 3876
. : milestone, 3659,
iast (2.21 ms) : 2147, 2272
. : milestone, 2210,
iast_GLOBAL (2.254 ms) : 2191, 2317
. : milestone, 2254,
profiling (2.072 ms) : 2021, 2124
. : milestone, 2072,
tracing (2.017 ms) : 1969, 2065
. : milestone, 2017,
section candidate
no_agent (1.48 ms) : 1468, 1492
. : milestone, 1480,
appsec (3.604 ms) : 3389, 3818
. : milestone, 3604,
iast (2.213 ms) : 2150, 2277
. : milestone, 2213,
iast_GLOBAL (2.251 ms) : 2188, 2314
. : milestone, 2251,
profiling (2.056 ms) : 2004, 2108
. : milestone, 2056,
tracing (2.035 ms) : 1986, 2084
. : milestone, 2035,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~e9095b558b, baseline=1.53.0-SNAPSHOT~27cd7f43d9
dateFormat X
axisFormat %s
section baseline
no_agent (15.507 s) : 15507000, 15507000
. : milestone, 15507000,
appsec (14.911 s) : 14911000, 14911000
. : milestone, 14911000,
iast (18.67 s) : 18670000, 18670000
. : milestone, 18670000,
iast_GLOBAL (18.245 s) : 18245000, 18245000
. : milestone, 18245000,
profiling (15.131 s) : 15131000, 15131000
. : milestone, 15131000,
tracing (14.869 s) : 14869000, 14869000
. : milestone, 14869000,
section candidate
no_agent (15.494 s) : 15494000, 15494000
. : milestone, 15494000,
appsec (14.821 s) : 14821000, 14821000
. : milestone, 14821000,
iast (18.781 s) : 18781000, 18781000
. : milestone, 18781000,
iast_GLOBAL (18.108 s) : 18108000, 18108000
. : milestone, 18108000,
profiling (15.531 s) : 15531000, 15531000
. : milestone, 15531000,
tracing (14.771 s) : 14771000, 14771000
. : milestone, 14771000,
|
1e2a4ed
to
0687a05
Compare
Code coverage: total 57.51%, base diff 0.06%, patch 88.95% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: e9095b5 | Docs | Was this helpful? Give us feedback! |
dbf1bee
to
87c7127
Compare
7bd7a48
to
2a1f676
Compare
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.
Very nice testing! 👏
I only few comments about minor improvements and readability.
...rc/test/groovy/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeWriterTest.groovy
Outdated
Show resolved
Hide resolved
.../src/main/java/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStream.java
Outdated
Show resolved
Hide resolved
...t/groovy/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStreamTest.groovy
Outdated
Show resolved
Hide resolved
...t/groovy/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStreamTest.groovy
Outdated
Show resolved
Hide resolved
...t/groovy/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStreamTest.groovy
Outdated
Show resolved
Hide resolved
...t/instrumentation/servlet/request-3/src/test/groovy/RumHttpServletResponseWrapperTest.groovy
Outdated
Show resolved
Hide resolved
...t/instrumentation/servlet/request-3/src/test/groovy/RumHttpServletResponseWrapperTest.groovy
Outdated
Show resolved
Hide resolved
...t/instrumentation/servlet/request-3/src/test/groovy/RumHttpServletResponseWrapperTest.groovy
Show resolved
Hide resolved
internal-api/src/test/groovy/datadog/trace/api/rum/RumInjectorMetricsTest.groovy
Outdated
Show resolved
Hide resolved
internal-api/src/test/groovy/datadog/trace/api/rum/RumInjectorTest.groovy
Show resolved
Hide resolved
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.
Thanks for all the follow up changes!
Nice work, especially around testing 👏
.../src/main/java/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStream.java
Outdated
Show resolved
Hide resolved
...st-3/src/main/java/datadog/trace/instrumentation/servlet3/RumHttpServletResponseWrapper.java
Outdated
Show resolved
Hide resolved
...st-3/src/main/java/datadog/trace/instrumentation/servlet3/RumHttpServletResponseWrapper.java
Outdated
Show resolved
Hide resolved
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.
It looks good. I left few comments or questions for improvement or clarification
What Does This Do
Add telemetry for the RUM injector. Gather injection metrics and tags, and send the data via StatsDClient. The common metrics are based on: https://github.com/DataDog/dd-go/blob/prod/trace/apps/tracer-telemetry-intake/telemetry-metrics/static/common_metrics.json
Motivation
Complete the RUM Injector requirements (doc)
Additional Notes
This telemetry implementation does not include the following metrics:
injection.initialization.failed
: Initialization failures can be due to a multitude of reasons and are already covered by SSI telemetryinjection.installation
: Installation metrics are related to web server installers and not captured by this RUM injector implementationinjection.installation.duration
: Installation metrics are related to web server installers and not captured by this RUM injector implementationIt also does not include the
injector_version
tag for theinjection.failed
metric. This tag refers to the Rust injector and we do not implement that.Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: https://datadoghq.atlassian.net/browse/LANGPLAT-679