open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
890 stars 426 forks source link

[EXPORTER] Add logging for async gRPC errors #3108

Closed santigimeno closed 1 month ago

santigimeno commented 1 month ago

Changes

If there's a gRPC error when exporting telemetry data via gRPC with ENABLE_ASYNC_EXPORT set, this error is not printed via logs in the same way as it's done when exporting the data synchronously. Print the error stored in grpc::Status in the same way.

netlify[bot] commented 1 month ago

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
Latest commit 18d94fb124ce68e313a50c49292c4b52138f2404
Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/671a024af823fb0008051d42
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.91%. Comparing base (497eaf4) to head (8e551cf). Report is 146 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3108/graphs/tree.svg?width=650&height=150&src=pr&token=FJESTYQ2AD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3108?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #3108 +/- ## ========================================== + Coverage 87.12% 87.91% +0.79% ========================================== Files 200 195 -5 Lines 6109 6133 +24 ========================================== + Hits 5322 5391 +69 + Misses 787 742 -45 ``` [see 98 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3108/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)