Skip to content

Provide optimized writers for OpenTelemetry's "common.proto" wire protocol#10947

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits intomasterfrom
mcculls/otlp-common-proto-writers
Mar 25, 2026
Merged

Provide optimized writers for OpenTelemetry's "common.proto" wire protocol#10947
gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits intomasterfrom
mcculls/otlp-common-proto-writers

Conversation

@mcculls
Copy link
Copy Markdown
Contributor

@mcculls mcculls commented Mar 24, 2026

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 of AttributeType.

The testcase was generated with the assistance of claude

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels 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.

@mcculls mcculls requested a review from a team as a code owner March 24, 2026 01:18
@mcculls mcculls requested a review from a team as a code owner March 24, 2026 01:18
@mcculls mcculls added the tag: no release notes Changes to exclude from release notes label Mar 24, 2026
@mcculls mcculls removed the request for review from a team March 24, 2026 01:18
@mcculls mcculls added the inst: opentelemetry OpenTelemetry instrumentation label Mar 24, 2026
@mcculls mcculls requested review from mhlidd and mtoffl01 March 24, 2026 01:18
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 24, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/otlp-common-proto-writers
git_commit_date 1774384670 1774385514
git_commit_sha e4f05e2 33681f9
release_version 1.61.0-SNAPSHOT~e4f05e2cc5 1.61.0-SNAPSHOT~33681f9f6a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774387282 1774387282
ci_job_id 1535174406 1535174406
ci_pipeline_id 104217543 104217543
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-ooh9g0zb 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-ooh9g0zb 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics.

Startup time reports for petclinic
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.251 s 192.287 ms (18.2%)
Agent iast 1.236 s 177.381 ms (16.8%)
Agent profiling 1.186 s 126.812 ms (12.0%)
Total tracing 11.165 s -
Total appsec 11.211 s 45.72 ms (0.4%)
Total iast 11.283 s 117.721 ms (1.1%)
Total profiling 11.073 s -92.089 ms (-0.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.068 s -
Agent appsec 1.247 s 179.266 ms (16.8%)
Agent iast 1.227 s 159.013 ms (14.9%)
Agent profiling 1.186 s 117.671 ms (11.0%)
Total tracing 11.238 s -
Total appsec 11.12 s -117.901 ms (-1.0%)
Total iast 11.258 s 20.004 ms (0.2%)
Total profiling 11.133 s -105.004 ms (-0.9%)
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
Loading
Startup time reports for insecure-bank
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent iast 1.229 s 173.069 ms (16.4%)
Total tracing 8.855 s -
Total iast 9.57 s 714.64 ms (8.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.228 s 172.183 ms (16.3%)
Total tracing 8.869 s -
Total iast 9.597 s 728.513 ms (8.2%)
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
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/otlp-common-proto-writers
git_commit_date 1774384670 1774385514
git_commit_sha e4f05e2 33681f9
release_version 1.61.0-SNAPSHOT~e4f05e2cc5 1.61.0-SNAPSHOT~33681f9f6a
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774387754 1774387754
ci_job_id 1535174407 1535174407
ci_pipeline_id 104217543 104217543
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-2-imjlmn5r 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-2-imjlmn5r 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 1 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 17 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load better
[-334.048µs; -148.387µs] or [-11.648%; -5.174%]
unstable
[-1398.958µs; -229.539µs] or [-16.638%; -2.730%]
unstable
[-63.478op/s; +247.978op/s] or [-5.038%; +19.679%]
2.627ms 7.594ms 1352.344op/s 2.868ms 8.408ms 1260.094op/s
scenario:load:insecure-bank:iast:high_load unsure
[+44.165µs; +107.926µs] or [+1.799%; +4.397%]
worse
[+154.197µs; +439.036µs] or [+2.158%; +6.144%]
unstable
[-187.473op/s; +95.785op/s] or [-12.930%; +6.606%]
2.531ms 7.442ms 1404.094op/s 2.455ms 7.146ms 1449.938op/s
scenario:load:petclinic:code_origins:high_load worse
[+543.745µs; +1332.837µs] or [+3.068%; +7.520%]
unsure
[+81.519µs; +1191.701µs] or [+0.278%; +4.071%]
unstable
[-42.809op/s; +16.872op/s] or [-16.489%; +6.498%]
18.661ms 29.908ms 246.656op/s 17.723ms 29.271ms 259.625op/s
Request duration reports for insecure-bank
gantt
    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,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.177 ms [1.166 ms, 1.189 ms] -
iast 3.153 ms [3.116 ms, 3.19 ms] 1.975 ms (167.8%)
iast_FULL 5.937 ms [5.876 ms, 5.998 ms] 4.76 ms (404.2%)
iast_GLOBAL 3.64 ms [3.572 ms, 3.707 ms] 2.462 ms (209.1%)
profiling 2.174 ms [2.155 ms, 2.193 ms] 996.631 µs (84.6%)
tracing 1.82 ms [1.805 ms, 1.836 ms] 643.041 µs (54.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.182 ms [1.17 ms, 1.193 ms] -
iast 3.259 ms [3.216 ms, 3.302 ms] 2.077 ms (175.8%)
iast_FULL 6.003 ms [5.942 ms, 6.063 ms] 4.821 ms (408.0%)
iast_GLOBAL 3.387 ms [3.329 ms, 3.445 ms] 2.205 ms (186.6%)
profiling 2.033 ms [2.015 ms, 2.05 ms] 850.872 µs (72.0%)
tracing 1.786 ms [1.771 ms, 1.801 ms] 604.673 µs (51.2%)
Request duration reports for petclinic
gantt
    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,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.298 ms [19.103 ms, 19.493 ms] -
appsec 18.898 ms [18.703 ms, 19.092 ms] -400.404 µs (-2.1%)
code_origins 17.971 ms [17.789 ms, 18.152 ms] -1.327 ms (-6.9%)
iast 18.345 ms [18.158 ms, 18.531 ms] -953.138 µs (-4.9%)
profiling 20.917 ms [20.701 ms, 21.132 ms] 1.619 ms (8.4%)
tracing 18.092 ms [17.914 ms, 18.269 ms] -1.206 ms (-6.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.196 ms [18.009 ms, 18.384 ms] -
appsec 19.022 ms [18.827 ms, 19.216 ms] 825.524 µs (4.5%)
code_origins 18.923 ms [18.734 ms, 19.111 ms] 726.665 µs (4.0%)
iast 17.94 ms [17.758 ms, 18.123 ms] -255.683 µs (-1.4%)
profiling 20.202 ms [19.992 ms, 20.412 ms] 2.006 ms (11.0%)
tracing 17.744 ms [17.568 ms, 17.921 ms] -451.809 µs (-2.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/otlp-common-proto-writers
git_commit_date 1774384670 1774385514
git_commit_sha e4f05e2 33681f9
release_version 1.61.0-SNAPSHOT~e4f05e2cc5 1.61.0-SNAPSHOT~33681f9f6a
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1774387440 1774387440
ci_job_id 1535174408 1535174408
ci_pipeline_id 104217543 104217543
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-cyisxkwz 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-cyisxkwz 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.882 s [14.882 s, 14.882 s] -
appsec 14.658 s [14.658 s, 14.658 s] -224.0 ms (-1.5%)
iast 18.809 s [18.809 s, 18.809 s] 3.927 s (26.4%)
iast_GLOBAL 17.711 s [17.711 s, 17.711 s] 2.829 s (19.0%)
profiling 14.919 s [14.919 s, 14.919 s] 37.0 ms (0.2%)
tracing 15.022 s [15.022 s, 15.022 s] 140.0 ms (0.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.444 s [15.444 s, 15.444 s] -
appsec 14.753 s [14.753 s, 14.753 s] -691.0 ms (-4.5%)
iast 18.742 s [18.742 s, 18.742 s] 3.298 s (21.4%)
iast_GLOBAL 18.105 s [18.105 s, 18.105 s] 2.661 s (17.2%)
profiling 14.963 s [14.963 s, 14.963 s] -481.0 ms (-3.1%)
tracing 14.981 s [14.981 s, 14.981 s] -463.0 ms (-3.0%)
Execution time for tomcat
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.461 ms, 1.484 ms] -
appsec 3.764 ms [3.546 ms, 3.981 ms] 2.291 ms (155.5%)
iast 2.263 ms [2.194 ms, 2.332 ms] 790.021 µs (53.6%)
iast_GLOBAL 2.309 ms [2.239 ms, 2.379 ms] 836.162 µs (56.8%)
profiling 2.084 ms [2.029 ms, 2.139 ms] 610.994 µs (41.5%)
tracing 2.084 ms [2.03 ms, 2.139 ms] 611.598 µs (41.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.461 ms, 1.484 ms] -
appsec 3.826 ms [3.604 ms, 4.048 ms] 2.353 ms (159.8%)
iast 2.257 ms [2.188 ms, 2.326 ms] 784.272 µs (53.3%)
iast_GLOBAL 2.3 ms [2.23 ms, 2.369 ms] 827.06 µs (56.2%)
profiling 2.096 ms [2.04 ms, 2.152 ms] 623.573 µs (42.3%)
tracing 2.059 ms [2.006 ms, 2.112 ms] 586.436 µs (39.8%)

@mcculls mcculls force-pushed the mcculls/otlp-common-proto-writers branch from 0569a73 to f8e0a8d Compare March 24, 2026 09:15
Copy link
Copy Markdown
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! 👍

@mcculls
Copy link
Copy Markdown
Contributor Author

mcculls commented Mar 24, 2026

Testcase has been parameterized and updated with additional bounds checking.

Wrt. null handling - we're taking the same approach as OTel and letting an exception happen when there is bad attribute data, which will then drop the surrounding message:

[otel.javaagent 2026-03-24 12:05:38:268 +0000] [PeriodicMetricReader-1] WARN io.opentelemetry.sdk.metrics.export.PeriodicMetricReader - Exporter threw an Exception
java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "value" is null
	at io.opentelemetry.exporter.internal.otlp.BoolAnyValueStatelessMarshaler.getBinarySerializedSize(BoolAnyValueStatelessMarshaler.java:29)
	at io.opentelemetry.exporter.internal.otlp.BoolAnyValueStatelessMarshaler.getBinarySerializedSize(BoolAnyValueStatelessMarshaler.java:16)
	at io.opentelemetry.exporter.internal.marshal.StatelessMarshalerUtil.sizeRepeatedMessageWithContext(StatelessMarshalerUtil.java:134)

@mcculls mcculls force-pushed the mcculls/otlp-common-proto-writers branch from b006244 to 33681f9 Compare March 24, 2026 20:52
Copy link
Copy Markdown
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Thanks for the follow up changes 👍

@PerfectSlayer
Copy link
Copy Markdown
Contributor

Re-run system tests from CI failure:

Exit: Container mssql can't be started
!!!!!!!!!!! _pytest.outcomes.Exit: Container mssql can't be started !!!!!!!!!!!!
Error: Process completed with exit code 1.

@mcculls
Copy link
Copy Markdown
Contributor Author

mcculls commented Mar 25, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Mar 25, 2026

View all feedbacks in Devflow UI.

2026-03-25 08:06:55 UTC ℹ️ Start processing command /merge


2026-03-25 08:07:04 UTC ℹ️ MergeQueue: waiting for PR to be ready

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.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-03-25 08:14:06 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 3h (p90).


2026-03-25 09:25:28 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit bbaa2d2 into master Mar 25, 2026
738 of 740 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the mcculls/otlp-common-proto-writers branch March 25, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation tag: no release notes Changes to exclude from release notes type: feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants