-
Notifications
You must be signed in to change notification settings - Fork 290
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
Track payload size for Kafka integration #6045
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 52 cases.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.026 s) : 0, 1025617
Total [baseline] (9.277 s) : 0, 9277462
Agent [candidate] (1.034 s) : 0, 1033857
Total [candidate] (9.307 s) : 0, 9306940
section appsec
Agent [baseline] (1.113 s) : 0, 1113255
Total [baseline] (9.342 s) : 0, 9342114
Agent [candidate] (1.124 s) : 0, 1124468
Total [candidate] (9.427 s) : 0, 9426787
section iast
Agent [baseline] (1.152 s) : 0, 1152012
Total [baseline] (9.521 s) : 0, 9520896
Agent [candidate] (1.154 s) : 0, 1154490
Total [candidate] (9.534 s) : 0, 9534348
section profiling
Agent [baseline] (1.21 s) : 0, 1209865
Total [baseline] (9.546 s) : 0, 9546165
Agent [candidate] (1.211 s) : 0, 1210952
Total [candidate] (9.504 s) : 0, 9503697
gantt
title petclinic - break down per module: candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (641.377 ms) : 0, 641377
BytebuddyAgent [candidate] (646.418 ms) : 0, 646418
GlobalTracer [baseline] (293.975 ms) : 0, 293975
GlobalTracer [candidate] (296.354 ms) : 0, 296354
AppSec [baseline] (48.994 ms) : 0, 48994
AppSec [candidate] (49.475 ms) : 0, 49475
Remote Config [baseline] (692.694 µs) : 0, 693
Remote Config [candidate] (700.01 µs) : 0, 700
Telemetry [baseline] (6.094 ms) : 0, 6094
Telemetry [candidate] (6.198 ms) : 0, 6198
section appsec
BytebuddyAgent [baseline] (641.055 ms) : 0, 641055
BytebuddyAgent [candidate] (648.118 ms) : 0, 648118
GlobalTracer [baseline] (293.146 ms) : 0, 293146
GlobalTracer [candidate] (296.096 ms) : 0, 296096
AppSec [baseline] (138.36 ms) : 0, 138360
AppSec [candidate] (139.061 ms) : 0, 139061
Remote Config [baseline] (642.432 µs) : 0, 642
Remote Config [candidate] (645.938 µs) : 0, 646
Telemetry [baseline] (5.717 ms) : 0, 5717
Telemetry [candidate] (5.824 ms) : 0, 5824
section iast
BytebuddyAgent [baseline] (771.489 ms) : 0, 771489
BytebuddyAgent [candidate] (772.682 ms) : 0, 772682
GlobalTracer [baseline] (273.315 ms) : 0, 273315
GlobalTracer [candidate] (274.193 ms) : 0, 274193
AppSec [baseline] (47.397 ms) : 0, 47397
AppSec [candidate] (47.165 ms) : 0, 47165
Remote Config [baseline] (581.661 µs) : 0, 582
Remote Config [candidate] (584.065 µs) : 0, 584
Telemetry [baseline] (10.399 ms) : 0, 10399
Telemetry [candidate] (6.128 ms) : 0, 6128
IAST [baseline] (14.249 ms) : 0, 14249
IAST [candidate] (19.243 ms) : 0, 19243
section profiling
BytebuddyAgent [baseline] (656.976 ms) : 0, 656976
BytebuddyAgent [candidate] (658.664 ms) : 0, 658664
GlobalTracer [baseline] (360.93 ms) : 0, 360930
GlobalTracer [candidate] (360.705 ms) : 0, 360705
AppSec [baseline] (50.199 ms) : 0, 50199
AppSec [candidate] (50.004 ms) : 0, 50004
Remote Config [baseline] (646.77 µs) : 0, 647
Remote Config [candidate] (656.504 µs) : 0, 657
Telemetry [baseline] (6.084 ms) : 0, 6084
Telemetry [candidate] (6.059 ms) : 0, 6059
ProfilingAgent [baseline] (81.211 ms) : 0, 81211
ProfilingAgent [candidate] (81.081 ms) : 0, 81081
Profiling [baseline] (81.235 ms) : 0, 81235
Profiling [candidate] (81.105 ms) : 0, 81105
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.025 s) : 0, 1025453
Total [baseline] (8.736 s) : 0, 8735925
Agent [candidate] (1.026 s) : 0, 1026355
Total [candidate] (8.758 s) : 0, 8758233
section iast
Agent [baseline] (1.161 s) : 0, 1161257
Total [baseline] (9.313 s) : 0, 9313417
Agent [candidate] (1.155 s) : 0, 1155194
Total [candidate] (9.267 s) : 0, 9267378
section iast_TELEMETRY_OFF
Agent [baseline] (1.145 s) : 0, 1145485
Total [baseline] (9.256 s) : 0, 9256469
Agent [candidate] (1.145 s) : 0, 1145263
Total [candidate] (9.271 s) : 0, 9270511
gantt
title insecure-bank - break down per module: candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (641.492 ms) : 0, 641492
BytebuddyAgent [candidate] (641.584 ms) : 0, 641584
GlobalTracer [baseline] (293.542 ms) : 0, 293542
GlobalTracer [candidate] (294.396 ms) : 0, 294396
AppSec [baseline] (49.21 ms) : 0, 49210
AppSec [candidate] (49.144 ms) : 0, 49144
Remote Config [baseline] (677.745 µs) : 0, 678
Remote Config [candidate] (686.053 µs) : 0, 686
Telemetry [baseline] (6.042 ms) : 0, 6042
Telemetry [candidate] (6.096 ms) : 0, 6096
section iast
BytebuddyAgent [baseline] (777.584 ms) : 0, 777584
BytebuddyAgent [candidate] (773.809 ms) : 0, 773809
GlobalTracer [baseline] (275.905 ms) : 0, 275905
GlobalTracer [candidate] (274.104 ms) : 0, 274104
AppSec [baseline] (47.669 ms) : 0, 47669
AppSec [candidate] (46.187 ms) : 0, 46187
IAST [baseline] (17.12 ms) : 0, 17120
IAST [candidate] (16.995 ms) : 0, 16995
Remote Config [baseline] (588.105 µs) : 0, 588
Remote Config [candidate] (597.845 µs) : 0, 598
Telemetry [baseline] (7.646 ms) : 0, 7646
Telemetry [candidate] (8.864 ms) : 0, 8864
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (765.04 ms) : 0, 765040
BytebuddyAgent [candidate] (765.065 ms) : 0, 765065
GlobalTracer [baseline] (274.039 ms) : 0, 274039
GlobalTracer [candidate] (274.144 ms) : 0, 274144
AppSec [baseline] (46.605 ms) : 0, 46605
AppSec [candidate] (46.641 ms) : 0, 46641
IAST [baseline] (16.432 ms) : 0, 16432
IAST [candidate] (17.638 ms) : 0, 17638
Remote Config [baseline] (653.366 µs) : 0, 653
Remote Config [candidate] (602.247 µs) : 0, 602
Telemetry [baseline] (8.179 ms) : 0, 8179
Telemetry [candidate] (6.785 ms) : 0, 6785
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section baseline
no_agent (1.324 ms) : 1305, 1343
. : milestone, 1324,
appsec (1.712 ms) : 1688, 1737
. : milestone, 1712,
iast (1.457 ms) : 1433, 1482
. : milestone, 1457,
profiling (1.463 ms) : 1438, 1487
. : milestone, 1463,
tracing (1.46 ms) : 1435, 1485
. : milestone, 1460,
section candidate
no_agent (1.344 ms) : 1326, 1363
. : milestone, 1344,
appsec (1.701 ms) : 1676, 1726
. : milestone, 1701,
iast (1.454 ms) : 1429, 1478
. : milestone, 1454,
profiling (1.499 ms) : 1473, 1525
. : milestone, 1499,
tracing (1.461 ms) : 1436, 1485
. : milestone, 1461,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~6d34af9fa9, baseline=1.23.0-SNAPSHOT~c2cfdeaf5e
dateFormat X
axisFormat %s
section baseline
no_agent (365.248 µs) : 344, 386
. : milestone, 365,
iast (459.553 µs) : 439, 480
. : milestone, 460,
iast_FULL (523.134 µs) : 502, 544
. : milestone, 523,
iast_INACTIVE (431.706 µs) : 411, 453
. : milestone, 432,
iast_TELEMETRY_OFF (457.224 µs) : 436, 478
. : milestone, 457,
tracing (431.785 µs) : 410, 453
. : milestone, 432,
section candidate
no_agent (366.769 µs) : 344, 389
. : milestone, 367,
iast (462.248 µs) : 441, 483
. : milestone, 462,
iast_FULL (527.019 µs) : 506, 548
. : milestone, 527,
iast_INACTIVE (429.705 µs) : 409, 451
. : milestone, 430,
iast_TELEMETRY_OFF (457.531 µs) : 436, 479
. : milestone, 458,
tracing (429.761 µs) : 409, 450
. : milestone, 430,
|
...rc/main/java/datadog/trace/instrumentation/armeria/grpc/server/TracingServerInterceptor.java
Show resolved
Hide resolved
...aws-java-sqs-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sqs/TracingIterator.java
Outdated
Show resolved
Hide resolved
...aws-java-sqs-2.0/src/main/java/datadog/trace/instrumentation/aws/v2/sqs/TracingIterator.java
Outdated
Show resolved
Hide resolved
...pc-1.5/src/main/java/datadog/trace/instrumentation/grpc/server/TracingServerInterceptor.java
Show resolved
Hide resolved
...rc/main/java/datadog/trace/instrumentation/kafka_streams/KafkaStreamTaskInstrumentation.java
Outdated
Show resolved
Hide resolved
...itmq-amqp-2.7/src/main/java/datadog/trace/instrumentation/rabbitmq/amqp/RabbitDecorator.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/datastreams/DefaultDataStreamsMonitoring.java
Show resolved
Hide resolved
...rc/main/java/datadog/trace/instrumentation/kafka_streams/KafkaStreamTaskInstrumentation.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/StatsPoint.java
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/datastreams/DefaultPathwayContext.java
Show resolved
Hide resolved
...-clients-0.11/src/main/java/datadog/trace/instrumentation/kafka_clients/TracingIterator.java
Outdated
Show resolved
Hide resolved
17eacbc
to
53081cc
Compare
Context? Goal? Description? |
I added a little paragraph in the description, but I don't have a whole lot of info to add. |
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.
One change request for internal tracer API.
I will let the two other default reviewers review the PR.
...pi/src/main/java/datadog/trace/bootstrap/instrumentation/api/AgentDataStreamsMonitoring.java
Outdated
Show resolved
Hide resolved
...tion/kafka-clients-0.11/src/main/java/datadog/trace/instrumentation/kafka_clients/Utils.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.
Thanks for the API edition
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
AgentTracer.get().getDataStreamsMonitoring().setCheckpoint(span, sortedTags, produceMillis); | ||
AgentTracer.get() | ||
.getDataStreamsMonitoring() | ||
.setCheckpoint(span, sortedTags, produceMillis, 0); |
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.
Nit: since you have the signature without the payload size you can just use it (and leave that class unchanged). It will generate a smaller diff (the same applied for all the other decorators)
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.
no I don't have it anymore, @PerfectSlayer asked in #6045 (comment) that I remove it !
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. I left a comment. Please let apm-java also review that PR
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
pathwayLatency.accept(((double) pathwayLatencyNano) / NANOSECONDS_TO_SECOND); | ||
edgeLatency.accept(((double) edgeLatencyNano) / NANOSECONDS_TO_SECOND); | ||
// payload size is set to zero when we cannot compute it | ||
// in that case, it's probably better to have an empty histogram than filling it with zeros | ||
if (payloadSizeBytes != 0) payloadSize.accept((double) payloadSizeBytes); |
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 don't even know spotless would agree to use such kind of one-liner... 🤔
This is mirroring part of the features that were added to the .net tracer in DataDog/dd-trace-dotnet#4520, on DSM team's request.
tested locally with a sample producer and consumer, I can see the metric being emited in my DD org
Jira ticket: AIT-8557