opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

fix: Improved logging for OTLP Tonic Exporter

Open cijothomas opened this issue 4 months ago • 1 comments

Improved logging

  1. Interceptor failures are logged separately from export failures. Built-in interceptor simply adds Metadata, and has no scope of failure, so if this fails, it indicates user has added custom interceptors which is failing.
  2. Log individual fields in the OTLP exporter, and then return Result contains just the minimal info about failure as OTLP's own log already has sufficient information, and no need to duplicate it by upstream component like batchexportprocessor/readers.

Related to https://github.com/open-telemetry/opentelemetry-rust/issues/3021

cijothomas avatar Aug 02 '25 19:08 cijothomas

Codecov Report

:x: Patch coverage is 0% with 38 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 80.6%. Comparing base (9cde968) to head (7d27b99).

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/tonic/metrics.rs 0.0% 14 Missing :warning:
opentelemetry-otlp/src/exporter/tonic/logs.rs 0.0% 12 Missing :warning:
opentelemetry-otlp/src/exporter/tonic/trace.rs 0.0% 12 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3108     +/-   ##
=======================================
- Coverage   80.7%   80.6%   -0.1%     
=======================================
  Files        126     126             
  Lines      22305   22329     +24     
=======================================
  Hits       18007   18007             
- Misses      4298    4322     +24     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 02 '25 19:08 codecov[bot]