Provide optimized writers for OpenTelemetry's "trace.proto" wire protocol#11120
Open
Provide optimized writers for OpenTelemetry's "trace.proto" wire protocol#11120
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1062728
Total [baseline] (8.883 s) : 0, 8883248
Agent [candidate] (1.056 s) : 0, 1056291
Total [candidate] (8.867 s) : 0, 8866843
section iast
Agent [baseline] (1.224 s) : 0, 1224347
Total [baseline] (9.577 s) : 0, 9577036
Agent [candidate] (1.223 s) : 0, 1222761
Total [candidate] (9.57 s) : 0, 9569971
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.239 ms) : 0, 1239
crashtracking [candidate] (1.234 ms) : 0, 1234
BytebuddyAgent [baseline] (638.882 ms) : 0, 638882
BytebuddyAgent [candidate] (633.346 ms) : 0, 633346
AgentMeter [baseline] (29.76 ms) : 0, 29760
AgentMeter [candidate] (29.54 ms) : 0, 29540
GlobalTracer [baseline] (249.539 ms) : 0, 249539
GlobalTracer [candidate] (249.608 ms) : 0, 249608
AppSec [baseline] (32.431 ms) : 0, 32431
AppSec [candidate] (32.382 ms) : 0, 32382
Debugger [baseline] (59.32 ms) : 0, 59320
Debugger [candidate] (59.267 ms) : 0, 59267
Remote Config [baseline] (601.731 µs) : 0, 602
Remote Config [candidate] (587.875 µs) : 0, 588
Telemetry [baseline] (8.03 ms) : 0, 8030
Telemetry [candidate] (8.083 ms) : 0, 8083
Flare Poller [baseline] (6.626 ms) : 0, 6626
Flare Poller [candidate] (6.006 ms) : 0, 6006
section iast
crashtracking [baseline] (1.232 ms) : 0, 1232
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (802.041 ms) : 0, 802041
BytebuddyAgent [candidate] (799.792 ms) : 0, 799792
AgentMeter [baseline] (11.396 ms) : 0, 11396
AgentMeter [candidate] (11.335 ms) : 0, 11335
GlobalTracer [baseline] (239.294 ms) : 0, 239294
GlobalTracer [candidate] (239.057 ms) : 0, 239057
IAST [baseline] (25.802 ms) : 0, 25802
IAST [candidate] (25.834 ms) : 0, 25834
AppSec [baseline] (32.059 ms) : 0, 32059
AppSec [candidate] (28.873 ms) : 0, 28873
Debugger [baseline] (58.793 ms) : 0, 58793
Debugger [candidate] (63.985 ms) : 0, 63985
Remote Config [baseline] (556.282 µs) : 0, 556
Remote Config [candidate] (1.115 ms) : 0, 1115
Telemetry [baseline] (13.582 ms) : 0, 13582
Telemetry [candidate] (11.731 ms) : 0, 11731
Flare Poller [baseline] (3.417 ms) : 0, 3417
Flare Poller [candidate] (3.411 ms) : 0, 3411
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1063215
Total [baseline] (11.164 s) : 0, 11163600
Agent [candidate] (1.061 s) : 0, 1061028
Total [candidate] (11.138 s) : 0, 11137976
section appsec
Agent [baseline] (1.263 s) : 0, 1263128
Total [baseline] (11.219 s) : 0, 11219321
Agent [candidate] (1.265 s) : 0, 1264521
Total [candidate] (11.15 s) : 0, 11150450
section iast
Agent [baseline] (1.226 s) : 0, 1225765
Total [baseline] (11.408 s) : 0, 11408349
Agent [candidate] (1.23 s) : 0, 1229953
Total [candidate] (11.291 s) : 0, 11291319
section profiling
Agent [baseline] (1.194 s) : 0, 1193857
Total [baseline] (11.152 s) : 0, 11152497
Agent [candidate] (1.186 s) : 0, 1186138
Total [candidate] (11.069 s) : 0, 11069198
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.256 ms) : 0, 1256
crashtracking [candidate] (1.215 ms) : 0, 1215
BytebuddyAgent [baseline] (636.256 ms) : 0, 636256
BytebuddyAgent [candidate] (632.754 ms) : 0, 632754
AgentMeter [baseline] (29.462 ms) : 0, 29462
AgentMeter [candidate] (29.49 ms) : 0, 29490
GlobalTracer [baseline] (250.28 ms) : 0, 250280
GlobalTracer [candidate] (249.419 ms) : 0, 249419
AppSec [baseline] (32.65 ms) : 0, 32650
AppSec [candidate] (32.371 ms) : 0, 32371
Debugger [baseline] (60.432 ms) : 0, 60432
Debugger [candidate] (60.179 ms) : 0, 60179
Remote Config [baseline] (595.776 µs) : 0, 596
Remote Config [candidate] (606.555 µs) : 0, 607
Telemetry [baseline] (8.168 ms) : 0, 8168
Telemetry [candidate] (8.072 ms) : 0, 8072
Flare Poller [baseline] (7.646 ms) : 0, 7646
Flare Poller [candidate] (10.553 ms) : 0, 10553
section appsec
crashtracking [baseline] (1.279 ms) : 0, 1279
crashtracking [candidate] (1.264 ms) : 0, 1264
BytebuddyAgent [baseline] (670.13 ms) : 0, 670130
BytebuddyAgent [candidate] (672.009 ms) : 0, 672009
AgentMeter [baseline] (12.165 ms) : 0, 12165
AgentMeter [candidate] (12.263 ms) : 0, 12263
GlobalTracer [baseline] (250.766 ms) : 0, 250766
GlobalTracer [candidate] (252.363 ms) : 0, 252363
AppSec [baseline] (187.214 ms) : 0, 187214
AppSec [candidate] (186.109 ms) : 0, 186109
Debugger [baseline] (67.206 ms) : 0, 67206
Debugger [candidate] (66.356 ms) : 0, 66356
Remote Config [baseline] (626.089 µs) : 0, 626
Remote Config [candidate] (613.046 µs) : 0, 613
Telemetry [baseline] (8.572 ms) : 0, 8572
Telemetry [candidate] (8.542 ms) : 0, 8542
Flare Poller [baseline] (3.627 ms) : 0, 3627
Flare Poller [candidate] (3.583 ms) : 0, 3583
IAST [baseline] (24.759 ms) : 0, 24759
IAST [candidate] (24.713 ms) : 0, 24713
section iast
crashtracking [baseline] (1.237 ms) : 0, 1237
crashtracking [candidate] (1.22 ms) : 0, 1220
BytebuddyAgent [baseline] (801.314 ms) : 0, 801314
BytebuddyAgent [candidate] (805.219 ms) : 0, 805219
AgentMeter [baseline] (11.398 ms) : 0, 11398
AgentMeter [candidate] (11.495 ms) : 0, 11495
GlobalTracer [baseline] (239.842 ms) : 0, 239842
GlobalTracer [candidate] (240.406 ms) : 0, 240406
AppSec [baseline] (30.449 ms) : 0, 30449
AppSec [candidate] (33.08 ms) : 0, 33080
Debugger [baseline] (61.932 ms) : 0, 61932
Debugger [candidate] (60.778 ms) : 0, 60778
Remote Config [baseline] (540.219 µs) : 0, 540
Remote Config [candidate] (538.642 µs) : 0, 539
Telemetry [baseline] (11.676 ms) : 0, 11676
Telemetry [candidate] (11.404 ms) : 0, 11404
Flare Poller [baseline] (3.481 ms) : 0, 3481
Flare Poller [candidate] (3.496 ms) : 0, 3496
IAST [baseline] (27.454 ms) : 0, 27454
IAST [candidate] (25.816 ms) : 0, 25816
section profiling
ProfilingAgent [baseline] (94.193 ms) : 0, 94193
ProfilingAgent [candidate] (94.103 ms) : 0, 94103
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (697.422 ms) : 0, 697422
BytebuddyAgent [candidate] (692.656 ms) : 0, 692656
AgentMeter [baseline] (9.201 ms) : 0, 9201
AgentMeter [candidate] (9.128 ms) : 0, 9128
GlobalTracer [baseline] (208.948 ms) : 0, 208948
GlobalTracer [candidate] (207.14 ms) : 0, 207140
AppSec [baseline] (33.058 ms) : 0, 33058
AppSec [candidate] (32.952 ms) : 0, 32952
Debugger [baseline] (66.032 ms) : 0, 66032
Debugger [candidate] (65.714 ms) : 0, 65714
Remote Config [baseline] (571.299 µs) : 0, 571
Remote Config [candidate] (577.019 µs) : 0, 577
Telemetry [baseline] (7.823 ms) : 0, 7823
Telemetry [candidate] (7.813 ms) : 0, 7813
Flare Poller [baseline] (3.51 ms) : 0, 3510
Flare Poller [candidate] (3.609 ms) : 0, 3609
Profiling [baseline] (94.773 ms) : 0, 94773
Profiling [candidate] (94.666 ms) : 0, 94666
LoadParameters
See matching parameters
SummaryFound 9 performance improvements and 3 performance regressions! Performance is the same for 8 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section baseline
no_agent (1.257 ms) : 1246, 1269
. : milestone, 1257,
iast (3.371 ms) : 3318, 3424
. : milestone, 3371,
iast_FULL (6.075 ms) : 6013, 6136
. : milestone, 6075,
iast_GLOBAL (3.727 ms) : 3669, 3786
. : milestone, 3727,
profiling (2.247 ms) : 2226, 2268
. : milestone, 2247,
tracing (1.873 ms) : 1858, 1888
. : milestone, 1873,
section candidate
no_agent (1.126 ms) : 1115, 1136
. : milestone, 1126,
iast (3.028 ms) : 2989, 3067
. : milestone, 3028,
iast_FULL (5.511 ms) : 5457, 5565
. : milestone, 5511,
iast_GLOBAL (3.493 ms) : 3434, 3551
. : milestone, 3493,
profiling (2.008 ms) : 1991, 2026
. : milestone, 2008,
tracing (1.752 ms) : 1737, 1766
. : milestone, 1752,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section baseline
no_agent (19.532 ms) : 19331, 19733
. : milestone, 19532,
appsec (19.717 ms) : 19518, 19916
. : milestone, 19717,
code_origins (17.919 ms) : 17741, 18097
. : milestone, 17919,
iast (18.094 ms) : 17917, 18271
. : milestone, 18094,
profiling (18.289 ms) : 18110, 18469
. : milestone, 18289,
tracing (17.872 ms) : 17691, 18053
. : milestone, 17872,
section candidate
no_agent (19.445 ms) : 19248, 19643
. : milestone, 19445,
appsec (19.021 ms) : 18830, 19212
. : milestone, 19021,
code_origins (18.775 ms) : 18587, 18963
. : milestone, 18775,
iast (17.992 ms) : 17817, 18167
. : milestone, 17992,
profiling (20.312 ms) : 20108, 20515
. : milestone, 20312,
tracing (18.554 ms) : 18368, 18739
. : milestone, 18554,
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.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section baseline
no_agent (1.485 ms) : 1474, 1497
. : milestone, 1485,
appsec (2.537 ms) : 2482, 2592
. : milestone, 2537,
iast (2.279 ms) : 2209, 2349
. : milestone, 2279,
iast_GLOBAL (2.318 ms) : 2248, 2388
. : milestone, 2318,
profiling (2.098 ms) : 2042, 2154
. : milestone, 2098,
tracing (2.086 ms) : 2032, 2140
. : milestone, 2086,
section candidate
no_agent (1.484 ms) : 1472, 1496
. : milestone, 1484,
appsec (3.832 ms) : 3610, 4055
. : milestone, 3832,
iast (2.274 ms) : 2204, 2344
. : milestone, 2274,
iast_GLOBAL (2.314 ms) : 2244, 2383
. : milestone, 2314,
profiling (2.101 ms) : 2046, 2156
. : milestone, 2101,
tracing (2.088 ms) : 2034, 2142
. : milestone, 2088,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~ab2ef0b759, baseline=1.62.0-SNAPSHOT~071ce9dae5
dateFormat X
axisFormat %s
section baseline
no_agent (15.091 s) : 15091000, 15091000
. : milestone, 15091000,
appsec (14.707 s) : 14707000, 14707000
. : milestone, 14707000,
iast (18.45 s) : 18450000, 18450000
. : milestone, 18450000,
iast_GLOBAL (18.143 s) : 18143000, 18143000
. : milestone, 18143000,
profiling (14.752 s) : 14752000, 14752000
. : milestone, 14752000,
tracing (15.106 s) : 15106000, 15106000
. : milestone, 15106000,
section candidate
no_agent (15.121 s) : 15121000, 15121000
. : milestone, 15121000,
appsec (14.36 s) : 14360000, 14360000
. : milestone, 14360000,
iast (18.327 s) : 18327000, 18327000
. : milestone, 18327000,
iast_GLOBAL (17.932 s) : 17932000, 17932000
. : milestone, 17932000,
profiling (15.298 s) : 15298000, 15298000
. : milestone, 15298000,
tracing (15.073 s) : 15073000, 15073000
. : milestone, 15073000,
|
70a51c8 to
783aaf4
Compare
583dc0c to
4adb56e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Uses a single temporary buffer as in #10983 to prepare message chunks at different nesting levels (resource / scope / span)
First we chunk all nested messages, i.e. span-links, for a given span. Once the span is complete we add the first part of the span message and its chunked links to the scoped chunks. Once the scope is complete we add the first part of the scoped spans message and all its chunks (span messages and their links) to the payload. Once all the span data has been chunked we add the enclosing resource metrics message to the start of the payload.
Motivation
Avoids need to use full protobuf library while keeping intermediate array creation to a minimum.
Additional Notes
OtlpTraceProtoTestwas created with the help of Claude.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.