Skip to content

Add bounding for OTLP response body#361

Merged
fractalwrench merged 3 commits intoopen-telemetry:mainfrom
fractalwrench:fw/bound-response-body
Apr 1, 2026
Merged

Add bounding for OTLP response body#361
fractalwrench merged 3 commits intoopen-telemetry:mainfrom
fractalwrench:fw/bound-response-body

Conversation

@fractalwrench
Copy link
Copy Markdown
Member

@fractalwrench fractalwrench commented Mar 31, 2026

Goal

Adds bounding so that only the first N bytes of a response body are read.

Closes #362

@fractalwrench fractalwrench requested a review from a team as a code owner March 31, 2026 14:37
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.87%. Comparing base (6a91758) to head (a9ddd89).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...otlin/io/opentelemetry/kotlin/export/OtlpClient.kt 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #361   +/-   ##
=======================================
  Coverage   90.86%   90.87%           
=======================================
  Files         257      257           
  Lines        3209     3210    +1     
  Branches      355      355           
=======================================
+ Hits         2916     2917    +1     
  Misses        213      213           
  Partials       80       80           

☔ 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.

bodyAsChannel().readRemaining(MAX_ERROR_BODY_BYTES).readByteArray()

private companion object {
const val MAX_ERROR_BODY_BYTES: Long = 64 * 1024
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Latest iteration of open-telemetry/opentelemetry-proto#781 is 4 * 1024 * 1024.

Copy link
Copy Markdown
Contributor

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

Nice. LGTM

@fractalwrench fractalwrench merged commit d72be41 into open-telemetry:main Apr 1, 2026
5 checks passed
@fractalwrench fractalwrench deleted the fw/bound-response-body branch April 1, 2026 10:25
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.

Add bounding for OTLP response body read

3 participants