Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPORTER] Add logging for async gRPC errors #3108

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

santigimeno
Copy link
Contributor

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.

@santigimeno santigimeno requested a review from a team as a code owner October 22, 2024 13:24
Copy link

netlify bot commented Oct 22, 2024

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

Name Link
🔨 Latest commit 18d94fb
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/671a024af823fb0008051d42

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

@@            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

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

See proposed change to fix CI.

exporters/otlp/src/otlp_grpc_client.cc Outdated Show resolved Hide resolved
OTEL_INTERNAL_LOG_ERROR("[OTLP GRPC Client] ERROR: Export "
<< export_data_name << " failed with status_code: \""
<< grpc_status.error_code() << "\" error_message: \""
<< grpc_status.error_message() << "\"");
Copy link
Member

Choose a reason for hiding this comment

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

Not related to this PR, but we need to figure out some way of throttling, as this can otherwise flood the logs for the non-recoverable issues.

Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

LGTM and thanks

@marcalff marcalff merged commit 9947619 into open-telemetry:main Oct 24, 2024
55 checks passed
malkia added a commit to malkia/opentelemetry-cpp that referenced this pull request Oct 24, 2024
[EXPORTER] Add logging for async gRPC errors (open-telemetry#3108)
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.

4 participants