Skip to content

Reduce allocation rate when marshaling OTLP data#11296

Open
mcculls wants to merge 1 commit intomasterfrom
mcculls/otlp-buffer-performance
Open

Reduce allocation rate when marshaling OTLP data#11296
mcculls wants to merge 1 commit intomasterfrom
mcculls/otlp-buffer-performance

Conversation

@mcculls
Copy link
Copy Markdown
Contributor

@mcculls mcculls commented May 6, 2026

What Does This Do

Marshals proto messages into a single prepending buffer, instead of many small byte-arrays and moves decision whether to export a span into OtlpTraceCollector (avoids re-allocations)

Motivation

Avoid O(n) allocations when serializing spans, metrics, or logs.

Additional Notes

Tests have been updated and cleaned up 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 added type: feature request tag: performance Performance related changes inst: opentelemetry OpenTelemetry instrumentation labels May 6, 2026
@mcculls mcculls force-pushed the mcculls/otlp-buffer-performance branch 2 times, most recently from c4d131f to d6ff0d7 Compare May 6, 2026 21:44
@mcculls mcculls marked this pull request as ready for review May 6, 2026 23:59
@mcculls mcculls requested a review from a team as a code owner May 6, 2026 23:59
@mcculls mcculls requested a review from dougqh May 6, 2026 23:59
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6ff0d706b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@mcculls mcculls force-pushed the mcculls/otlp-buffer-performance branch from d6ff0d7 to 46e852c Compare May 7, 2026 09:15
@mcculls mcculls requested a review from a team as a code owner May 7, 2026 09:15
@mcculls mcculls requested review from mhlidd and removed request for a team May 7, 2026 09:15
…any small byte-arrays

and move decision whether to export a span into OtlpTraceCollector (avoids re-allocations)
@mcculls mcculls force-pushed the mcculls/otlp-buffer-performance branch from 46e852c to 6f5caa3 Compare May 7, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation tag: performance Performance related changes type: feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant