-
Notifications
You must be signed in to change notification settings - Fork 320
Add App Logs Collection feature #10156
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
Conversation
0a5090f to
e60662e
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.084 s) : 0, 1083853
Total [baseline] (10.799 s) : 0, 10798510
Agent [candidate] (1.079 s) : 0, 1079211
Total [candidate] (10.728 s) : 0, 10728461
section appsec
Agent [baseline] (1.269 s) : 0, 1269217
Total [baseline] (10.997 s) : 0, 10997010
Agent [candidate] (1.262 s) : 0, 1261780
Total [candidate] (10.975 s) : 0, 10974860
section iast
Agent [baseline] (1.225 s) : 0, 1225420
Total [baseline] (11.25 s) : 0, 11250132
Agent [candidate] (1.223 s) : 0, 1222846
Total [candidate] (11.246 s) : 0, 11245881
section profiling
Agent [baseline] (1.203 s) : 0, 1202754
Total [baseline] (10.876 s) : 0, 10876074
Agent [candidate] (1.205 s) : 0, 1204801
Total [candidate] (10.911 s) : 0, 10910882
gantt
title petclinic - break down per module: candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.178 ms) : 0, 1178
BytebuddyAgent [baseline] (649.883 ms) : 0, 649883
BytebuddyAgent [candidate] (647.903 ms) : 0, 647903
GlobalTracer [baseline] (283.086 ms) : 0, 283086
GlobalTracer [candidate] (281.265 ms) : 0, 281265
AppSec [baseline] (32.298 ms) : 0, 32298
AppSec [candidate] (32.08 ms) : 0, 32080
Debugger [baseline] (68.166 ms) : 0, 68166
Debugger [candidate] (68.302 ms) : 0, 68302
Remote Config [baseline] (632.7 µs) : 0, 633
Remote Config [candidate] (595.778 µs) : 0, 596
Telemetry [baseline] (9.127 ms) : 0, 9127
Telemetry [candidate] (8.838 ms) : 0, 8838
Flare Poller [baseline] (3.806 ms) : 0, 3806
Flare Poller [candidate] (3.611 ms) : 0, 3611
section appsec
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.202 ms) : 0, 1202
BytebuddyAgent [baseline] (691.713 ms) : 0, 691713
BytebuddyAgent [candidate] (688.568 ms) : 0, 688568
GlobalTracer [baseline] (260.412 ms) : 0, 260412
GlobalTracer [candidate] (258.019 ms) : 0, 258019
AppSec [baseline] (173.197 ms) : 0, 173197
AppSec [candidate] (173.316 ms) : 0, 173316
Debugger [baseline] (68.592 ms) : 0, 68592
Debugger [candidate] (67.382 ms) : 0, 67382
Remote Config [baseline] (708.505 µs) : 0, 709
Remote Config [candidate] (700.593 µs) : 0, 701
Telemetry [baseline] (9.09 ms) : 0, 9090
Telemetry [candidate] (8.921 ms) : 0, 8921
Flare Poller [baseline] (3.942 ms) : 0, 3942
Flare Poller [candidate] (3.864 ms) : 0, 3864
IAST [baseline] (24.774 ms) : 0, 24774
IAST [candidate] (24.319 ms) : 0, 24319
section iast
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (792.398 ms) : 0, 792398
BytebuddyAgent [candidate] (790.582 ms) : 0, 790582
GlobalTracer [baseline] (256.424 ms) : 0, 256424
GlobalTracer [candidate] (255.362 ms) : 0, 255362
AppSec [baseline] (35.011 ms) : 0, 35011
AppSec [candidate] (33.528 ms) : 0, 33528
Debugger [baseline] (65.05 ms) : 0, 65050
Debugger [candidate] (67.249 ms) : 0, 67249
Remote Config [baseline] (573.797 µs) : 0, 574
Remote Config [candidate] (606.778 µs) : 0, 607
Telemetry [baseline] (8.497 ms) : 0, 8497
Telemetry [candidate] (8.533 ms) : 0, 8533
Flare Poller [baseline] (3.528 ms) : 0, 3528
Flare Poller [candidate] (3.519 ms) : 0, 3519
IAST [baseline] (27.153 ms) : 0, 27153
IAST [candidate] (26.894 ms) : 0, 26894
section profiling
ProfilingAgent [baseline] (96.957 ms) : 0, 96957
ProfilingAgent [candidate] (97.435 ms) : 0, 97435
crashtracking [baseline] (1.21 ms) : 0, 1210
crashtracking [candidate] (1.245 ms) : 0, 1245
BytebuddyAgent [baseline] (700.75 ms) : 0, 700750
BytebuddyAgent [candidate] (701.891 ms) : 0, 701891
GlobalTracer [baseline] (220.753 ms) : 0, 220753
GlobalTracer [candidate] (220.895 ms) : 0, 220895
AppSec [baseline] (32.195 ms) : 0, 32195
AppSec [candidate] (32.176 ms) : 0, 32176
Debugger [baseline] (68.06 ms) : 0, 68060
Debugger [candidate] (68.135 ms) : 0, 68135
Remote Config [baseline] (607.511 µs) : 0, 608
Remote Config [candidate] (618.772 µs) : 0, 619
Telemetry [baseline] (8.818 ms) : 0, 8818
Telemetry [candidate] (8.879 ms) : 0, 8879
Flare Poller [baseline] (3.729 ms) : 0, 3729
Flare Poller [candidate] (3.754 ms) : 0, 3754
Profiling [baseline] (97.541 ms) : 0, 97541
Profiling [candidate] (98.007 ms) : 0, 98007
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.083 s) : 0, 1083276
Total [baseline] (8.766 s) : 0, 8765748
Agent [candidate] (1.082 s) : 0, 1081965
Total [candidate] (8.773 s) : 0, 8773171
section iast
Agent [baseline] (1.219 s) : 0, 1218905
Total [baseline] (9.35 s) : 0, 9350365
Agent [candidate] (1.22 s) : 0, 1219769
Total [candidate] (9.374 s) : 0, 9373732
gantt
title insecure-bank - break down per module: candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.199 ms) : 0, 1199
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (649.654 ms) : 0, 649654
BytebuddyAgent [candidate] (649.568 ms) : 0, 649568
GlobalTracer [baseline] (282.887 ms) : 0, 282887
GlobalTracer [candidate] (282.526 ms) : 0, 282526
AppSec [baseline] (32.377 ms) : 0, 32377
AppSec [candidate] (32.149 ms) : 0, 32149
Debugger [baseline] (68.024 ms) : 0, 68024
Debugger [candidate] (67.602 ms) : 0, 67602
Remote Config [baseline] (639.35 µs) : 0, 639
Remote Config [candidate] (607.538 µs) : 0, 608
Telemetry [baseline] (9.073 ms) : 0, 9073
Telemetry [candidate] (9.026 ms) : 0, 9026
Flare Poller [baseline] (3.781 ms) : 0, 3781
Flare Poller [candidate] (3.687 ms) : 0, 3687
section iast
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.186 ms) : 0, 1186
BytebuddyAgent [baseline] (789.039 ms) : 0, 789039
BytebuddyAgent [candidate] (789.379 ms) : 0, 789379
GlobalTracer [baseline] (254.753 ms) : 0, 254753
GlobalTracer [candidate] (254.874 ms) : 0, 254874
AppSec [baseline] (31.809 ms) : 0, 31809
AppSec [candidate] (33.718 ms) : 0, 33718
Debugger [baseline] (67.261 ms) : 0, 67261
Debugger [candidate] (65.833 ms) : 0, 65833
Remote Config [baseline] (605.67 µs) : 0, 606
Remote Config [candidate] (609.076 µs) : 0, 609
Telemetry [baseline] (8.417 ms) : 0, 8417
Telemetry [candidate] (8.454 ms) : 0, 8454
Flare Poller [baseline] (3.506 ms) : 0, 3506
Flare Poller [candidate] (3.498 ms) : 0, 3498
IAST [baseline] (26.783 ms) : 0, 26783
IAST [candidate] (26.88 ms) : 0, 26880
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 4 performance regressions! Performance is the same for 15 metrics, 15 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section baseline
no_agent (1.188 ms) : 1177, 1200
. : milestone, 1188,
iast (3.192 ms) : 3150, 3235
. : milestone, 3192,
iast_FULL (5.613 ms) : 5557, 5669
. : milestone, 5613,
iast_GLOBAL (3.566 ms) : 3507, 3625
. : milestone, 3566,
profiling (1.902 ms) : 1887, 1918
. : milestone, 1902,
tracing (1.841 ms) : 1826, 1856
. : milestone, 1841,
section candidate
no_agent (1.188 ms) : 1176, 1199
. : milestone, 1188,
iast (3.21 ms) : 3165, 3256
. : milestone, 3210,
iast_FULL (5.976 ms) : 5915, 6037
. : milestone, 5976,
iast_GLOBAL (3.594 ms) : 3541, 3646
. : milestone, 3594,
profiling (1.974 ms) : 1956, 1992
. : milestone, 1974,
tracing (1.858 ms) : 1841, 1874
. : milestone, 1858,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section baseline
no_agent (19.115 ms) : 18918, 19313
. : milestone, 19115,
appsec (18.523 ms) : 18335, 18711
. : milestone, 18523,
code_origins (17.367 ms) : 17196, 17537
. : milestone, 17367,
iast (17.429 ms) : 17258, 17599
. : milestone, 17429,
profiling (20.755 ms) : 20549, 20961
. : milestone, 20755,
tracing (17.797 ms) : 17622, 17972
. : milestone, 17797,
section candidate
no_agent (19.052 ms) : 18858, 19246
. : milestone, 19052,
appsec (19.046 ms) : 18853, 19240
. : milestone, 19046,
code_origins (18.101 ms) : 17922, 18281
. : milestone, 18101,
iast (17.675 ms) : 17498, 17852
. : milestone, 17675,
profiling (18.74 ms) : 18554, 18926
. : milestone, 18740,
tracing (18.283 ms) : 18100, 18465
. : milestone, 18283,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section baseline
no_agent (15.56 s) : 15560000, 15560000
. : milestone, 15560000,
appsec (14.541 s) : 14541000, 14541000
. : milestone, 14541000,
iast (18.172 s) : 18172000, 18172000
. : milestone, 18172000,
iast_GLOBAL (17.687 s) : 17687000, 17687000
. : milestone, 17687000,
profiling (15.075 s) : 15075000, 15075000
. : milestone, 15075000,
tracing (14.504 s) : 14504000, 14504000
. : milestone, 14504000,
section candidate
no_agent (15.279 s) : 15279000, 15279000
. : milestone, 15279000,
appsec (14.777 s) : 14777000, 14777000
. : milestone, 14777000,
iast (18.052 s) : 18052000, 18052000
. : milestone, 18052000,
iast_GLOBAL (17.989 s) : 17989000, 17989000
. : milestone, 17989000,
profiling (14.718 s) : 14718000, 14718000
. : milestone, 14718000,
tracing (14.473 s) : 14473000, 14473000
. : milestone, 14473000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~ba23ef3c76, baseline=1.58.0-SNAPSHOT~7442d01dcc
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.687 ms) : 3470, 3905
. : milestone, 3687,
iast (2.21 ms) : 2146, 2274
. : milestone, 2210,
iast_GLOBAL (2.252 ms) : 2187, 2317
. : milestone, 2252,
profiling (2.055 ms) : 2003, 2108
. : milestone, 2055,
tracing (2.042 ms) : 1991, 2093
. : milestone, 2042,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.708 ms) : 3489, 3926
. : milestone, 3708,
iast (2.212 ms) : 2147, 2276
. : milestone, 2212,
iast_GLOBAL (2.248 ms) : 2183, 2313
. : milestone, 2248,
profiling (2.064 ms) : 2012, 2117
. : milestone, 2064,
tracing (2.036 ms) : 1985, 2086
. : milestone, 2036,
|
e60662e to
9470cec
Compare
9470cec to
6ef9061
Compare
6ef9061 to
3d4d2ca
Compare
0d5b1e5 to
20f1e33
Compare
Add application logs collection based on log framework instrumentation that hooks when log event are generated to be written. Log events are sent to Logs backend through Datadog agent's Event Platform (Evp) proxy. We are reusing a previous infrastructure used for uploading logs for CI Visibility (see #7082). We are adding support for Logback. This feature is opt-in through DD_APP_LOGS_COLLECTION_ENABLED config. Logs are sent as structured log layout and allow to add any additional attributes. For now we are adding directly trace correlation ids (traceId and spanId) and give the logs injection feature for free and without any setup on the log framework side. Smoke tests are based on Logs Injection tests. # Conflicts: # metadata/supported-configurations.json
20f1e33 to
d32101e
Compare
| } | ||
|
|
||
| public static class CallAppendersAdvice2 { | ||
| @Advice.OnMethodEnter |
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.
can you suppress all the Throwables here ?
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.
done
| && InstrumenterConfig.get().isAgentlessLogSubmissionEnabled(); | ||
| return (super.isApplicable(enabledSystems) | ||
| && InstrumenterConfig.get().isAgentlessLogSubmissionEnabled()) | ||
| || Config.get().isAppLogsCollectionEnabled(); |
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.
we tend to use InstrumenterConfig here since is more lightweight to build comparing to Config (since this is called during the premain). However it's true that other instrumentations are using Config.get(). If possible, moving that to InstrumenterConfig will help keeping that design idea
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.
done
amarziali
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.
Thanks for that cool addition. It looks OK to me
What Does This Do
Add logs capture based on log framework instrumentation that hooks when log event are generated to be written. Log events are sent to Logs backend through Datadog agent's Event Platform (Evp) proxy. We are reusing a previous infrastructure used for uploading logs for CI Visibility (see #7082).
We are adding support for Logback.
This feature is opt-in through
DD_APP_LOGS_COLLECTION_ENABLEDconfig. Logs are sent as structured log layout and allow to add any additional attributes. For now we are adding directly trace correlation ids (traceId and spanId) and give the logs injection feature for free and without any setup on the log framework side.Smoke tests are based on Logs Injection tests.
Motivation
On-boarding Logs easily through tracer that are already installed through SSI
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]