Skip to content

Conversation

@scottgerring
Copy link
Member

@scottgerring scottgerring commented Oct 21, 2025

Fixes #865, handling partial success for HTTP and tonic OTLP responses by logging the portion of the request that was rejected by the server and not retrying.

The relevant bit of the spec is here.

Changes

Straightforward enough! The testing is rather limited because all we're doing is parsing and logging responses; let's make sure we don't panic for invalid or empty data, as well as a minimal smoke test.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 51.31579% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.7%. Comparing base (9bbe272) to head (07670f4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/http/logs.rs 63.4% 15 Missing ⚠️
opentelemetry-otlp/src/exporter/http/trace.rs 63.4% 15 Missing ⚠️
opentelemetry-otlp/src/exporter/http/metrics.rs 70.2% 11 Missing ⚠️
opentelemetry-otlp/src/exporter/tonic/logs.rs 0.0% 9 Missing ⚠️
opentelemetry-otlp/src/exporter/tonic/metrics.rs 0.0% 9 Missing ⚠️
opentelemetry-otlp/src/exporter/tonic/trace.rs 0.0% 9 Missing ⚠️
opentelemetry-otlp/src/exporter/http/mod.rs 0.0% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3206     +/-   ##
=======================================
- Coverage   80.8%   80.7%   -0.2%     
=======================================
  Files        128     128             
  Lines      23090   23220    +130     
=======================================
+ Hits       18676   18754     +78     
- Misses      4414    4466     +52     

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

@scottgerring scottgerring force-pushed the chore/partial-success branch 2 times, most recently from 585fa89 to 91a6e1e Compare October 21, 2025 11:30
@scottgerring scottgerring marked this pull request as ready for review October 21, 2025 11:50
@scottgerring scottgerring requested a review from a team as a code owner October 21, 2025 11:50
assert_eq!("my-test-event", first_event.name);
}

// Test for partial success response handling
Copy link
Member

Choose a reason for hiding this comment

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

not sure if we are actually validating anything in this test about partial-success.

Copy link
Member Author

Choose a reason for hiding this comment

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

@cijothomas
It's just to make sure things don't catch fire, but you are right, there is not much in the way of asserts - apart from it doesn't panic, and spans come out the end.

I changed the comment to reflect this, but if your feeling is it is overwrought it may well be and I can happily remove it. The use case here in general is straightforward enough - de-serialize and log partial success - that I don't think this adds much beyond the 'fail path' unit tests tbh.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM.

@scottgerring scottgerring force-pushed the chore/partial-success branch from 91a6e1e to 51cb999 Compare October 22, 2025 06:47
@lalitb lalitb merged commit f70afa2 into open-telemetry:main Oct 28, 2025
25 of 27 checks passed
@scottgerring scottgerring deleted the chore/partial-success branch October 28, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle partial success responses from OTLP export services

3 participants