-
Notifications
You must be signed in to change notification settings - Fork 324
Extract metrics from communication #10399
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
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (309.184 µs) : 276, 342
. : milestone, 309,
basic (274.659 µs) : 268, 281
. : milestone, 275,
loop (8.962 ms) : 8958, 8966
. : milestone, 8962,
section candidate
noprobe (327.593 µs) : 270, 385
. : milestone, 328,
basic (275.608 µs) : 270, 282
. : milestone, 276,
loop (8.962 ms) : 8957, 8968
. : milestone, 8962,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 7 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 8 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.088 s) : 0, 1087849
Total [baseline] (8.784 s) : 0, 8784400
Agent [candidate] (1.089 s) : 0, 1089435
Total [candidate] (8.775 s) : 0, 8775132
section iast
Agent [baseline] (1.229 s) : 0, 1228998
Total [baseline] (9.316 s) : 0, 9316258
Agent [candidate] (1.23 s) : 0, 1230165
Total [candidate] (9.351 s) : 0, 9351130
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.173 ms) : 0, 1173
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (652.066 ms) : 0, 652066
BytebuddyAgent [candidate] (652.52 ms) : 0, 652520
AgentMeter [candidate] (28.776 ms) : 0, 28776
GlobalTracer [baseline] (285.569 ms) : 0, 285569
GlobalTracer [candidate] (257.773 ms) : 0, 257773
AppSec [baseline] (32.757 ms) : 0, 32757
AppSec [candidate] (33.069 ms) : 0, 33069
Debugger [baseline] (65.791 ms) : 0, 65791
Debugger [candidate] (66.408 ms) : 0, 66408
Remote Config [baseline] (614.51 µs) : 0, 615
Remote Config [candidate] (627.484 µs) : 0, 627
Telemetry [baseline] (8.946 ms) : 0, 8946
Telemetry [candidate] (8.944 ms) : 0, 8944
Flare Poller [baseline] (5.413 ms) : 0, 5413
Flare Poller [candidate] (4.616 ms) : 0, 4616
section iast
crashtracking [baseline] (1.179 ms) : 0, 1179
crashtracking [candidate] (1.182 ms) : 0, 1182
BytebuddyAgent [baseline] (793.227 ms) : 0, 793227
BytebuddyAgent [candidate] (793.574 ms) : 0, 793574
AgentMeter [candidate] (11.278 ms) : 0, 11278
GlobalTracer [baseline] (259.737 ms) : 0, 259737
GlobalTracer [candidate] (249.22 ms) : 0, 249220
IAST [baseline] (27.197 ms) : 0, 27197
IAST [candidate] (26.895 ms) : 0, 26895
AppSec [baseline] (33.702 ms) : 0, 33702
AppSec [candidate] (31.686 ms) : 0, 31686
Debugger [baseline] (66.125 ms) : 0, 66125
Debugger [candidate] (68.545 ms) : 0, 68545
Remote Config [baseline] (540.772 µs) : 0, 541
Remote Config [candidate] (542.896 µs) : 0, 543
Telemetry [baseline] (8.466 ms) : 0, 8466
Telemetry [candidate] (8.49 ms) : 0, 8490
Flare Poller [baseline] (3.519 ms) : 0, 3519
Flare Poller [candidate] (3.505 ms) : 0, 3505
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.095 s) : 0, 1094706
Total [baseline] (10.802 s) : 0, 10802429
Agent [candidate] (1.09 s) : 0, 1089529
Total [candidate] (10.69 s) : 0, 10689765
section appsec
Agent [baseline] (1.27 s) : 0, 1269529
Total [baseline] (11.075 s) : 0, 11074969
Agent [candidate] (1.269 s) : 0, 1268549
Total [candidate] (11.028 s) : 0, 11027889
section iast
Agent [baseline] (1.241 s) : 0, 1241363
Total [baseline] (11.283 s) : 0, 11283192
Agent [candidate] (1.233 s) : 0, 1232733
Total [candidate] (11.208 s) : 0, 11207988
section profiling
Agent [baseline] (1.221 s) : 0, 1221133
Total [baseline] (10.965 s) : 0, 10964725
Agent [candidate] (1.208 s) : 0, 1207709
Total [candidate] (10.902 s) : 0, 10902115
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.181 ms) : 0, 1181
crashtracking [candidate] (1.172 ms) : 0, 1172
BytebuddyAgent [baseline] (656.898 ms) : 0, 656898
BytebuddyAgent [candidate] (652.034 ms) : 0, 652034
AgentMeter [candidate] (28.974 ms) : 0, 28974
GlobalTracer [baseline] (286.645 ms) : 0, 286645
GlobalTracer [candidate] (257.477 ms) : 0, 257477
AppSec [baseline] (33.053 ms) : 0, 33053
AppSec [candidate] (32.868 ms) : 0, 32868
Debugger [baseline] (68.135 ms) : 0, 68135
Debugger [candidate] (66.666 ms) : 0, 66666
Remote Config [baseline] (601.527 µs) : 0, 602
Remote Config [candidate] (613.074 µs) : 0, 613
Telemetry [baseline] (8.879 ms) : 0, 8879
Telemetry [candidate] (8.926 ms) : 0, 8926
Flare Poller [baseline] (3.767 ms) : 0, 3767
Flare Poller [candidate] (5.253 ms) : 0, 5253
section appsec
crashtracking [baseline] (1.173 ms) : 0, 1173
crashtracking [candidate] (1.174 ms) : 0, 1174
BytebuddyAgent [baseline] (691.355 ms) : 0, 691355
BytebuddyAgent [candidate] (691.221 ms) : 0, 691221
AgentMeter [candidate] (12.026 ms) : 0, 12026
GlobalTracer [baseline] (262.605 ms) : 0, 262605
GlobalTracer [candidate] (250.526 ms) : 0, 250526
AppSec [baseline] (173.661 ms) : 0, 173661
AppSec [candidate] (174.343 ms) : 0, 174343
Debugger [baseline] (66.803 ms) : 0, 66803
Debugger [candidate] (65.547 ms) : 0, 65547
Remote Config [baseline] (711.788 µs) : 0, 712
Remote Config [candidate] (673.476 µs) : 0, 673
Telemetry [baseline] (9.265 ms) : 0, 9265
Telemetry [candidate] (9.349 ms) : 0, 9349
Flare Poller [baseline] (3.694 ms) : 0, 3694
Flare Poller [candidate] (3.515 ms) : 0, 3515
IAST [baseline] (24.824 ms) : 0, 24824
IAST [candidate] (24.673 ms) : 0, 24673
section iast
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.185 ms) : 0, 1185
BytebuddyAgent [baseline] (800.65 ms) : 0, 800650
BytebuddyAgent [candidate] (794.456 ms) : 0, 794456
AgentMeter [candidate] (11.324 ms) : 0, 11324
GlobalTracer [baseline] (261.799 ms) : 0, 261799
GlobalTracer [candidate] (249.882 ms) : 0, 249882
AppSec [baseline] (34.076 ms) : 0, 34076
AppSec [candidate] (35.286 ms) : 0, 35286
Debugger [baseline] (67.885 ms) : 0, 67885
Debugger [candidate] (65.679 ms) : 0, 65679
Remote Config [baseline] (556.36 µs) : 0, 556
Remote Config [candidate] (535.698 µs) : 0, 536
Telemetry [baseline] (8.657 ms) : 0, 8657
Telemetry [candidate] (8.657 ms) : 0, 8657
Flare Poller [baseline] (3.551 ms) : 0, 3551
Flare Poller [candidate] (3.579 ms) : 0, 3579
IAST [baseline] (27.539 ms) : 0, 27539
IAST [candidate] (26.835 ms) : 0, 26835
section profiling
ProfilingAgent [baseline] (97.58 ms) : 0, 97580
ProfilingAgent [candidate] (95.934 ms) : 0, 95934
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.214 ms) : 0, 1214
BytebuddyAgent [baseline] (710.038 ms) : 0, 710038
BytebuddyAgent [candidate] (701.045 ms) : 0, 701045
AgentMeter [candidate] (8.792 ms) : 0, 8792
GlobalTracer [baseline] (227.033 ms) : 0, 227033
GlobalTracer [candidate] (216.034 ms) : 0, 216034
AppSec [baseline] (32.972 ms) : 0, 32972
AppSec [candidate] (32.585 ms) : 0, 32585
Debugger [baseline] (68.464 ms) : 0, 68464
Debugger [candidate] (68.079 ms) : 0, 68079
Remote Config [baseline] (626.322 µs) : 0, 626
Remote Config [candidate] (624.874 µs) : 0, 625
Telemetry [baseline] (8.92 ms) : 0, 8920
Telemetry [candidate] (8.802 ms) : 0, 8802
Flare Poller [baseline] (3.656 ms) : 0, 3656
Flare Poller [candidate] (4.864 ms) : 0, 4864
Profiling [baseline] (98.168 ms) : 0, 98168
Profiling [candidate] (96.518 ms) : 0, 96518
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 18 metrics, 15 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section baseline
no_agent (1.179 ms) : 1168, 1191
. : milestone, 1179,
iast (3.158 ms) : 3118, 3198
. : milestone, 3158,
iast_FULL (5.87 ms) : 5812, 5929
. : milestone, 5870,
iast_GLOBAL (3.67 ms) : 3609, 3731
. : milestone, 3670,
profiling (1.955 ms) : 1939, 1971
. : milestone, 1955,
tracing (1.809 ms) : 1794, 1824
. : milestone, 1809,
section candidate
no_agent (1.191 ms) : 1180, 1203
. : milestone, 1191,
iast (3.117 ms) : 3076, 3159
. : milestone, 3117,
iast_FULL (5.777 ms) : 5719, 5834
. : milestone, 5777,
iast_GLOBAL (3.695 ms) : 3642, 3748
. : milestone, 3695,
profiling (2.211 ms) : 2189, 2233
. : milestone, 2211,
tracing (1.753 ms) : 1739, 1768
. : milestone, 1753,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section baseline
no_agent (19.365 ms) : 19168, 19562
. : milestone, 19365,
appsec (19.056 ms) : 18863, 19250
. : milestone, 19056,
code_origins (17.776 ms) : 17601, 17950
. : milestone, 17776,
iast (18.898 ms) : 18707, 19090
. : milestone, 18898,
profiling (19.789 ms) : 19589, 19989
. : milestone, 19789,
tracing (17.884 ms) : 17709, 18059
. : milestone, 17884,
section candidate
no_agent (19.475 ms) : 19275, 19675
. : milestone, 19475,
appsec (18.571 ms) : 18376, 18765
. : milestone, 18571,
code_origins (18.035 ms) : 17855, 18215
. : milestone, 18035,
iast (17.793 ms) : 17617, 17969
. : milestone, 17793,
profiling (18.825 ms) : 18636, 19013
. : milestone, 18825,
tracing (17.782 ms) : 17606, 17958
. : milestone, 17782,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section baseline
no_agent (15.318 s) : 15318000, 15318000
. : milestone, 15318000,
appsec (14.598 s) : 14598000, 14598000
. : milestone, 14598000,
iast (18.241 s) : 18241000, 18241000
. : milestone, 18241000,
iast_GLOBAL (17.911 s) : 17911000, 17911000
. : milestone, 17911000,
profiling (15.093 s) : 15093000, 15093000
. : milestone, 15093000,
tracing (14.711 s) : 14711000, 14711000
. : milestone, 14711000,
section candidate
no_agent (14.951 s) : 14951000, 14951000
. : milestone, 14951000,
appsec (14.734 s) : 14734000, 14734000
. : milestone, 14734000,
iast (18.197 s) : 18197000, 18197000
. : milestone, 18197000,
iast_GLOBAL (17.892 s) : 17892000, 17892000
. : milestone, 17892000,
profiling (14.831 s) : 14831000, 14831000
. : milestone, 14831000,
tracing (14.565 s) : 14565000, 14565000
. : milestone, 14565000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~f4196be4c5, baseline=1.59.0-SNAPSHOT~0e6e189eee
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (3.63 ms) : 3413, 3848
. : milestone, 3630,
iast (2.205 ms) : 2140, 2269
. : milestone, 2205,
iast_GLOBAL (2.257 ms) : 2192, 2323
. : milestone, 2257,
profiling (2.081 ms) : 2027, 2135
. : milestone, 2081,
tracing (2.042 ms) : 1990, 2094
. : milestone, 2042,
section candidate
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (2.463 ms) : 2411, 2516
. : milestone, 2463,
iast (2.203 ms) : 2138, 2268
. : milestone, 2203,
iast_GLOBAL (2.253 ms) : 2188, 2319
. : milestone, 2253,
profiling (2.068 ms) : 2015, 2122
. : milestone, 2068,
tracing (2.028 ms) : 1977, 2079
. : milestone, 2028,
|
4d7ac37 to
253a264
Compare
products/metrics/metrics-lib/src/test/groovy/datadog/metrics/api/HistogramsTest.groovy
Outdated
Show resolved
Hide resolved
| throw new UndeclaredThrowableException(e); | ||
| } | ||
|
|
||
| installDatadogMeter(initTelemetry); |
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.
This is nice to have a separate agent for the metrics! I don't remember if the startup bench are comparing all the StaticEventLogger durations - just to say that having lower startup time here looks only a side effect since some code has been moved out tracing init
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.
Indeed. It introduces a new step: AgentMeter
StaticEventLogger.begin("AgentMeter");The overall startup time should not change, but the tracer time might artificially decrease.
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
AlexeyKuznetsov-DD
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.
PR is almost LGTM to me, left several minor comments
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java
Show resolved
Hide resolved
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/MeterInstaller.java
Outdated
Show resolved
Hide resolved
...agent-tooling/src/test/groovy/datadog/trace/agent/tooling/MeterInstallerSpecification.groovy
Show resolved
Hide resolved
| // val excludedClassesBranchCoverage by extra( | ||
| // listOf( | ||
| // ) | ||
| // ) | ||
| // val excludedClassesInstructionCoverage by extra( | ||
| // listOf( | ||
| // ) | ||
| // ) |
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.
reminder: cleanup commented code
| val minimumBranchCoverage by extra(0.5) | ||
| val minimumInstructionCoverage by extra(0.8) |
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.
would be nice to have better coverage if possible
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.
I left all the testing coverage part aside for now until the CI tests pass. I haven't still be able to get a single build working. Once working, I will re-apply the ignored classes here and start refactoring and testing.
So yes, I don't intent to leave it in this state.
1c65dc0 to
e5bda67
Compare
api in shared lib in metrics However there are still some things to think about The tracer jar now has split packages: > Task :dd-java-agent:generateAgentJarIndex [main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content 'datadog.metrics.statsd.*' under 'shared', already seen in metrics. Ensure your content is under a distinct directory. [main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content 'datadog.metrics.api.*' under 'shared', already seen in metrics. Ensure your content is under a distinct directory. Also, the metric-agent isn't using `excludeShared`, and the metrics-lib had to be removed from shared
* Also fixes the muzzle checks * Remove the need to exclude sketches-java when declaring metrics-lib
1. Bootstrap (root level):
- datadog/metrics/agent/AgentMeter.class
- datadog/metrics/api/*.class (interfaces: Counter, Histogram, Histograms, Monitoring, NoOp implementations)
2. metrics/:
- All metrics-lib implementation classes:
- datadog/metrics/api/DDSketchHistogram.classdata, etc.
- datadog/metrics/statsd/* (StatsDClient implementations)
3. shared/:
- com/datadoghq/sketch/** (sketches-java library)
This fixes GraalVM smoke test, but I would think the issue could have broken regular agent.
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.
looks ok to me
e5bda67 to
decc408
Compare
mcculls
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, appreciate all the explanatory comments
What Does This Do
This PR is the first step extracting the various concerns the
:communicationmodule mix.It all started when trying to move the
datadog.communication.monitorpackage from:communicationmodule to a dedicated module. The rest is only the required changed to make it work even if it grew bigger that wanted. It ended up by creating a dedicatedmetricsproduct.It introduces:
AgentMeterlike theAgentTracer(that got rid of the histogram related API)MeterInstallerto initialize the metrics part (both during agent bootstrap and native bootstrap):metrics-agentfor agent setup, ametrics-apiwith only metrics-related api (no dependencies), and ametrics-libwith api implementations dedicated Gradle modulesMotivation
The
:communicationmodule is going under a redo this quarter to provide clear API for intake communications.Additional Notes
There might be more to extract from
:internal-apiand:dd-trace-coreto the new metrics module but I want to start "small". We might consider consolidating the metrics product later, but for now, the focus is on:communication.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: APMLP-877