Skip to content

docs: add response size limitation#781

Merged
dashpole merged 10 commits intoopen-telemetry:mainfrom
pellared:limit-body
Apr 7, 2026
Merged

docs: add response size limitation#781
dashpole merged 10 commits intoopen-telemetry:mainfrom
pellared:limit-body

Conversation

@pellared
Copy link
Copy Markdown
Member

@pellared pellared commented Mar 30, 2026

@pellared pellared changed the title spec: add response body size limitation to mitigate memory usage risks docs: add response body size limitation to mitigate memory usage risks Mar 30, 2026
@pellared pellared changed the title docs: add response body size limitation to mitigate memory usage risks docs: add response body size limitation Mar 30, 2026
@pellared pellared requested a review from Copilot March 30, 2026 11:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a specification requirement for clients to cap OTLP response parsing size (including post-decompression) to mitigate excessive memory usage risks (CWE-789).

Changes:

  • Add normative guidance to limit OTLP/gRPC response parsing size (recommended 32 KiB) and treat oversize responses as non-retryable.
  • Add the same response-size-limiting guidance to OTLP/HTTP responses.
  • Document the change in the Unreleased changelog.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/specification.md Adds client-side response size limit requirements for both gRPC and HTTP OTLP responses.
CHANGELOG.md Notes the documentation/spec update in the Unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md Outdated
Comment thread docs/specification.md Outdated
Comment thread docs/specification.md Outdated
Comment thread docs/specification.md Outdated
@pellared
Copy link
Copy Markdown
Member Author

Do we also want to have something like (as a separate PR):

The server MUST limit the size of the request body when parsing it, including
after decompression, to mitigate possible excessive memory usage caused by a misconfigured or malicious client. It is RECOMMENDED to limit the request body to 64 MiB.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pellared pellared marked this pull request as ready for review March 30, 2026 12:09
martincostello added a commit to martincostello/opentelemetry-dotnet that referenced this pull request Mar 30, 2026
Limit the length of the HTTP response body that is read if export fails for gRPC or HTTP.

See open-telemetry/opentelemetry-proto#781.
Comment thread docs/specification.md Outdated
Comment thread docs/specification.md Outdated
@pellared pellared requested a review from arminru March 30, 2026 14:38
Comment thread docs/specification.md Outdated
@pellared pellared requested a review from yurishkuro March 30, 2026 14:48
Comment thread docs/specification.md Outdated
@pellared pellared requested a review from yurishkuro March 30, 2026 16:11
@pellared
Copy link
Copy Markdown
Member Author

pellared commented Mar 31, 2026

Do we also want to add some requirement that the server should not respond with content bigger than 4MB? Added as a follow-up in PR description as I do not want to scope creep this PR (also it has already a good amount of approvals).

Comment thread docs/specification.md
@jack-berg jack-berg self-assigned this Mar 31, 2026
Comment thread docs/specification.md
@pellared pellared changed the title docs: add response body size limitation docs: add response size limitation Mar 31, 2026
@pellared pellared requested a review from tigrannajaryan April 1, 2026 07:56
pellared added a commit to open-telemetry/opentelemetry-go that referenced this pull request Apr 1, 2026
@dashpole dashpole enabled auto-merge (squash) April 7, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.