Provide optimized writers for OpenTelemetry's "common.proto" wire protocol#10947
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1058736
Total [baseline] (11.165 s) : 0, 11164863
Agent [candidate] (1.068 s) : 0, 1067910
Total [candidate] (11.238 s) : 0, 11237896
section appsec
Agent [baseline] (1.251 s) : 0, 1251023
Total [baseline] (11.211 s) : 0, 11210583
Agent [candidate] (1.247 s) : 0, 1247176
Total [candidate] (11.12 s) : 0, 11119995
section iast
Agent [baseline] (1.236 s) : 0, 1236116
Total [baseline] (11.283 s) : 0, 11282584
Agent [candidate] (1.227 s) : 0, 1226924
Total [candidate] (11.258 s) : 0, 11257901
section profiling
Agent [baseline] (1.186 s) : 0, 1185548
Total [baseline] (11.073 s) : 0, 11072775
Agent [candidate] (1.186 s) : 0, 1185582
Total [candidate] (11.133 s) : 0, 11132892
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.213 ms) : 0, 1213
BytebuddyAgent [baseline] (628.465 ms) : 0, 628465
BytebuddyAgent [candidate] (635.34 ms) : 0, 635340
AgentMeter [baseline] (29.534 ms) : 0, 29534
AgentMeter [candidate] (29.625 ms) : 0, 29625
GlobalTracer [baseline] (258.072 ms) : 0, 258072
GlobalTracer [candidate] (259.289 ms) : 0, 259289
AppSec [baseline] (31.837 ms) : 0, 31837
AppSec [candidate] (32.08 ms) : 0, 32080
Debugger [baseline] (60.659 ms) : 0, 60659
Debugger [candidate] (61.106 ms) : 0, 61106
Remote Config [baseline] (594.368 µs) : 0, 594
Remote Config [candidate] (596.793 µs) : 0, 597
Telemetry [baseline] (8.8 ms) : 0, 8800
Telemetry [candidate] (8.095 ms) : 0, 8095
Flare Poller [baseline] (3.577 ms) : 0, 3577
Flare Poller [candidate] (4.305 ms) : 0, 4305
section appsec
crashtracking [baseline] (1.2 ms) : 0, 1200
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (661.139 ms) : 0, 661139
BytebuddyAgent [candidate] (659.333 ms) : 0, 659333
AgentMeter [baseline] (12.228 ms) : 0, 12228
AgentMeter [candidate] (12.102 ms) : 0, 12102
GlobalTracer [baseline] (258.932 ms) : 0, 258932
GlobalTracer [candidate] (258.081 ms) : 0, 258081
AppSec [baseline] (178.031 ms) : 0, 178031
AppSec [candidate] (177.647 ms) : 0, 177647
Debugger [baseline] (66.179 ms) : 0, 66179
Debugger [candidate] (65.831 ms) : 0, 65831
Remote Config [baseline] (642.958 µs) : 0, 643
Remote Config [candidate] (643.226 µs) : 0, 643
Telemetry [baseline] (8.348 ms) : 0, 8348
Telemetry [candidate] (8.399 ms) : 0, 8399
Flare Poller [baseline] (3.649 ms) : 0, 3649
Flare Poller [candidate] (3.544 ms) : 0, 3544
IAST [baseline] (24.278 ms) : 0, 24278
IAST [candidate] (24.136 ms) : 0, 24136
section iast
crashtracking [baseline] (1.24 ms) : 0, 1240
crashtracking [candidate] (1.188 ms) : 0, 1188
BytebuddyAgent [baseline] (801.383 ms) : 0, 801383
BytebuddyAgent [candidate] (794.839 ms) : 0, 794839
AgentMeter [baseline] (11.674 ms) : 0, 11674
AgentMeter [candidate] (11.423 ms) : 0, 11423
GlobalTracer [baseline] (248.639 ms) : 0, 248639
GlobalTracer [candidate] (247.027 ms) : 0, 247027
AppSec [baseline] (26.792 ms) : 0, 26792
AppSec [candidate] (26.524 ms) : 0, 26524
Debugger [baseline] (71.294 ms) : 0, 71294
Debugger [candidate] (71.247 ms) : 0, 71247
Remote Config [baseline] (538.833 µs) : 0, 539
Remote Config [candidate] (537.389 µs) : 0, 537
Telemetry [baseline] (9.273 ms) : 0, 9273
Telemetry [candidate] (9.261 ms) : 0, 9261
Flare Poller [baseline] (3.385 ms) : 0, 3385
Flare Poller [candidate] (3.372 ms) : 0, 3372
IAST [baseline] (25.642 ms) : 0, 25642
IAST [candidate] (25.347 ms) : 0, 25347
section profiling
crashtracking [baseline] (1.18 ms) : 0, 1180
crashtracking [candidate] (1.169 ms) : 0, 1169
BytebuddyAgent [baseline] (684.36 ms) : 0, 684360
BytebuddyAgent [candidate] (682.903 ms) : 0, 682903
AgentMeter [baseline] (9.018 ms) : 0, 9018
AgentMeter [candidate] (8.982 ms) : 0, 8982
GlobalTracer [baseline] (215.659 ms) : 0, 215659
GlobalTracer [candidate] (216.805 ms) : 0, 216805
AppSec [baseline] (32.103 ms) : 0, 32103
AppSec [candidate] (32.53 ms) : 0, 32530
Debugger [baseline] (65.27 ms) : 0, 65270
Debugger [candidate] (65.971 ms) : 0, 65971
Remote Config [baseline] (571.092 µs) : 0, 571
Remote Config [candidate] (569.983 µs) : 0, 570
Telemetry [baseline] (8.478 ms) : 0, 8478
Telemetry [candidate] (7.788 ms) : 0, 7788
Flare Poller [baseline] (3.478 ms) : 0, 3478
Flare Poller [candidate] (3.508 ms) : 0, 3508
ProfilingAgent [baseline] (94.189 ms) : 0, 94189
ProfilingAgent [candidate] (94.417 ms) : 0, 94417
Profiling [baseline] (94.75 ms) : 0, 94750
Profiling [candidate] (94.968 ms) : 0, 94968
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1055433
Total [baseline] (8.855 s) : 0, 8855160
Agent [candidate] (1.056 s) : 0, 1055996
Total [candidate] (8.869 s) : 0, 8868509
section iast
Agent [baseline] (1.229 s) : 0, 1228502
Total [baseline] (9.57 s) : 0, 9569799
Agent [candidate] (1.228 s) : 0, 1228179
Total [candidate] (9.597 s) : 0, 9597022
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.203 ms) : 0, 1203
BytebuddyAgent [baseline] (627.414 ms) : 0, 627414
BytebuddyAgent [candidate] (628.633 ms) : 0, 628633
AgentMeter [baseline] (29.451 ms) : 0, 29451
AgentMeter [candidate] (29.435 ms) : 0, 29435
GlobalTracer [baseline] (256.364 ms) : 0, 256364
GlobalTracer [candidate] (256.772 ms) : 0, 256772
AppSec [baseline] (31.595 ms) : 0, 31595
AppSec [candidate] (31.685 ms) : 0, 31685
Debugger [baseline] (59.644 ms) : 0, 59644
Debugger [candidate] (59.372 ms) : 0, 59372
Remote Config [baseline] (593.31 µs) : 0, 593
Remote Config [candidate] (609.993 µs) : 0, 610
Telemetry [baseline] (8.748 ms) : 0, 8748
Telemetry [candidate] (8.03 ms) : 0, 8030
Flare Poller [baseline] (4.333 ms) : 0, 4333
Flare Poller [candidate] (4.256 ms) : 0, 4256
section iast
crashtracking [baseline] (1.208 ms) : 0, 1208
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (796.433 ms) : 0, 796433
BytebuddyAgent [candidate] (796.436 ms) : 0, 796436
AgentMeter [baseline] (11.416 ms) : 0, 11416
AgentMeter [candidate] (11.412 ms) : 0, 11412
GlobalTracer [baseline] (247.467 ms) : 0, 247467
GlobalTracer [candidate] (247.367 ms) : 0, 247367
AppSec [baseline] (26.568 ms) : 0, 26568
AppSec [candidate] (26.587 ms) : 0, 26587
Debugger [baseline] (69.307 ms) : 0, 69307
Debugger [candidate] (69.21 ms) : 0, 69210
Remote Config [baseline] (532.34 µs) : 0, 532
Remote Config [candidate] (535.367 µs) : 0, 535
Telemetry [baseline] (10.246 ms) : 0, 10246
Telemetry [candidate] (10.207 ms) : 0, 10207
Flare Poller [baseline] (3.662 ms) : 0, 3662
Flare Poller [candidate] (3.75 ms) : 0, 3750
IAST [baseline] (25.413 ms) : 0, 25413
IAST [candidate] (25.384 ms) : 0, 25384
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 17 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section baseline
no_agent (1.177 ms) : 1166, 1189
. : milestone, 1177,
iast (3.153 ms) : 3116, 3190
. : milestone, 3153,
iast_FULL (5.937 ms) : 5876, 5998
. : milestone, 5937,
iast_GLOBAL (3.64 ms) : 3572, 3707
. : milestone, 3640,
profiling (2.174 ms) : 2155, 2193
. : milestone, 2174,
tracing (1.82 ms) : 1805, 1836
. : milestone, 1820,
section candidate
no_agent (1.182 ms) : 1170, 1193
. : milestone, 1182,
iast (3.259 ms) : 3216, 3302
. : milestone, 3259,
iast_FULL (6.003 ms) : 5942, 6063
. : milestone, 6003,
iast_GLOBAL (3.387 ms) : 3329, 3445
. : milestone, 3387,
profiling (2.033 ms) : 2015, 2050
. : milestone, 2033,
tracing (1.786 ms) : 1771, 1801
. : milestone, 1786,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section baseline
no_agent (19.298 ms) : 19103, 19493
. : milestone, 19298,
appsec (18.898 ms) : 18703, 19092
. : milestone, 18898,
code_origins (17.971 ms) : 17789, 18152
. : milestone, 17971,
iast (18.345 ms) : 18158, 18531
. : milestone, 18345,
profiling (20.917 ms) : 20701, 21132
. : milestone, 20917,
tracing (18.092 ms) : 17914, 18269
. : milestone, 18092,
section candidate
no_agent (18.196 ms) : 18009, 18384
. : milestone, 18196,
appsec (19.022 ms) : 18827, 19216
. : milestone, 19022,
code_origins (18.923 ms) : 18734, 19111
. : milestone, 18923,
iast (17.94 ms) : 17758, 18123
. : milestone, 17940,
profiling (20.202 ms) : 19992, 20412
. : milestone, 20202,
tracing (17.744 ms) : 17568, 17921
. : milestone, 17744,
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.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section baseline
no_agent (14.882 s) : 14882000, 14882000
. : milestone, 14882000,
appsec (14.658 s) : 14658000, 14658000
. : milestone, 14658000,
iast (18.809 s) : 18809000, 18809000
. : milestone, 18809000,
iast_GLOBAL (17.711 s) : 17711000, 17711000
. : milestone, 17711000,
profiling (14.919 s) : 14919000, 14919000
. : milestone, 14919000,
tracing (15.022 s) : 15022000, 15022000
. : milestone, 15022000,
section candidate
no_agent (15.444 s) : 15444000, 15444000
. : milestone, 15444000,
appsec (14.753 s) : 14753000, 14753000
. : milestone, 14753000,
iast (18.742 s) : 18742000, 18742000
. : milestone, 18742000,
iast_GLOBAL (18.105 s) : 18105000, 18105000
. : milestone, 18105000,
profiling (14.963 s) : 14963000, 14963000
. : milestone, 14963000,
tracing (14.981 s) : 14981000, 14981000
. : milestone, 14981000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~33681f9f6a, baseline=1.61.0-SNAPSHOT~e4f05e2cc5
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.764 ms) : 3546, 3981
. : milestone, 3764,
iast (2.263 ms) : 2194, 2332
. : milestone, 2263,
iast_GLOBAL (2.309 ms) : 2239, 2379
. : milestone, 2309,
profiling (2.084 ms) : 2029, 2139
. : milestone, 2084,
tracing (2.084 ms) : 2030, 2139
. : milestone, 2084,
section candidate
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.826 ms) : 3604, 4048
. : milestone, 3826,
iast (2.257 ms) : 2188, 2326
. : milestone, 2257,
iast_GLOBAL (2.3 ms) : 2230, 2369
. : milestone, 2300,
profiling (2.096 ms) : 2040, 2152
. : milestone, 2096,
tracing (2.059 ms) : 2006, 2112
. : milestone, 2059,
|
0569a73 to
f8e0a8d
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
Left few suggestions along the changes.
Overall, I would recommend adding test cases for the encoding.
In particular, it feels like the tests would benefit to become parametric and increase their coverage.
As example:
- the boolean one can be deduplicated
- numeric values don’t have negative nor zero values (nor min / max for their respective types)
- string does not test for non ascii character (to validate UTF8 internal encoding)
- array values could test empty arrays
- null values too, for all types and as part of a value of an array
- etc..
There are always so many things that can go wrong with an encoder 😬 But testing against the official decoder is a great approach! 👍
|
Testcase has been parameterized and updated with additional bounds checking. Wrt. |
b006244 to
33681f9
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
Looking good! Thanks for the follow up changes 👍
|
Re-run system tests from CI failure:
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
bbaa2d2
into
master
Motivation
Avoids having to embed a full protobuf library. Writers are optimized to precompute embedded message sizes. This lets us stream OTel attributes without needing to send them to a temporary buffer in order to get the message size.
Additional Notes
Contains a small amount of refactoring to preserve the attribute type id. This id is needed to disambiguate between different array attribute values that have the same erased type (
List) and is the same as the ordinal indices ofAttributeType.The testcase was generated with the assistance 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.