open-telemetry / open-telemetry/opentelemetry-ruby
Handle `partial_success` in OTLP Logs export responses
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Spec requirement
On an otherwise-2xx response, ExportLogsServiceResponse.partial_success (rejected_log_records, error_message) SHOULD be handled/logged. This is the same defect class this repo already tracks for other signals (ex. issue #1361, 'Handle partial success responses from OTLP export services').
Current behavior
exporter/otlp-logs/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb:172-175 (permalink) reads and discards the response body on Net::HTTPSuccess without ever decoding it as Opentelemetry::Proto::Collector::Logs::V1::ExportLogsServiceResponse — the partial_success field (present in the generated protobuf) is never inspected.
Suggested fix
Decode the response body on success, and if partial_success.rejected_log_records > 0, log partial_success.error_message via OpenTelemetry.handle_error, matching the existing log_status pattern already used on the error path (:241-251) (permalink).
Related rows in SPEC_COMPLIANCE_LOGS.md
OTLP-13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in exporter/otlp-logs/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb, especially the successful-response handling at lines 172-175 and the log_status pattern at lines 241-251. Check the generated ExportLogsServiceResponse fields and the OTLP-13 row in SPEC_COMPLIANCE_LOGS.md. Done means successful responses inspect partial_success and rejected records are reported through OpenTelemetry.handle_error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100