Skip to content

[exporterhelper] Switch request context encoding from map to KV list#13216

Merged
dmitryax merged 1 commit intoopen-telemetry:mainfrom
dmitryax:improve-marshal-request-performance
Jun 17, 2025
Merged

[exporterhelper] Switch request context encoding from map to KV list#13216
dmitryax merged 1 commit intoopen-telemetry:mainfrom
dmitryax:improve-marshal-request-performance

Conversation

@dmitryax
Copy link
Copy Markdown
Member

Resolves #13188 (review)

This also required moving to gogoproto to reuse existing opentelemetry.proto.common.v1.KeyValue message.

Benchmarks:

goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/collector/pdata/xpdata/request
cpu: Apple M1 Max

before:
BenchmarkEncodeDecodeContext-10    	  519790	      2278 ns/op	    1376 B/op	      22 allocs/op

after:
BenchmarkEncodeDecodeContext-10    	  747158	      1600 ns/op	     661 B/op	      18 allocs/op

@dmitryax dmitryax requested review from a team and bogdandrutu as code owners June 16, 2025 23:28
@dmitryax dmitryax added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 16, 2025
@dmitryax
Copy link
Copy Markdown
Member Author

No changelog item needed since it's not released yet

@dmitryax dmitryax force-pushed the improve-marshal-request-performance branch from 5cd9011 to 7dfa671 Compare June 16, 2025 23:31
Comment thread pdata/xpdata/request/requesttest.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.53%. Comparing base (d77b601) to head (0689fd0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pdata/xpdata/request/context.go 66.66% 7 Missing ⚠️

❌ Your patch status has failed because the patch coverage (78.12%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13216      +/-   ##
==========================================
- Coverage   91.55%   91.53%   -0.02%     
==========================================
  Files         522      522              
  Lines       28938    28955      +17     
==========================================
+ Hits        26494    26504      +10     
- Misses       1927     1934       +7     
  Partials      517      517              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmitryax dmitryax force-pushed the improve-marshal-request-performance branch from 7dfa671 to ab58472 Compare June 17, 2025 00:05
@github-actions github-actions Bot requested a review from bogdandrutu June 17, 2025 00:05
@dmitryax dmitryax force-pushed the improve-marshal-request-performance branch from ab58472 to 0689fd0 Compare June 17, 2025 00:27
@dmitryax dmitryax enabled auto-merge June 17, 2025 00:46
@dmitryax dmitryax added this pull request to the merge queue Jun 17, 2025
Merged via the queue into open-telemetry:main with commit e7b140f Jun 17, 2025
55 of 56 checks passed
@dmitryax dmitryax deleted the improve-marshal-request-performance branch June 17, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants