-
Notifications
You must be signed in to change notification settings - Fork 505
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
Small change to return error from periodic exporter #1857
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1857 +/- ##
======================================
Coverage ? 74.5%
======================================
Files ? 122
Lines ? 19809
Branches ? 0
======================================
Hits ? 14761
Misses ? 5048
Partials ? 0 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
opentelemetry-sdk/CHANGELOG.md
Outdated
@@ -45,6 +45,8 @@ | |||
|
|||
- **Breaking** [1850] (https://github.com/open-telemetry/opentelemetry-rust/pull/1850) `LoggerProvider::log_processors()` and `LoggerProvider::resource()` are not public methods anymore. They are only used within the `opentelemetry-sdk` crate. | |||
|
|||
- [1857](https://github.com/open-telemetry/opentelemetry-rust/pull/1857) Fixed an issue in the `collect_and_export()` method of the periodic exporter where errors during export were dropped, ensuring proper error handling and reporting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collect_and_export()
is not a public method. I'd suggest to phrase this in a way applicable to end users.
something like:
Fixed an issue in Metrics SDK which prevented export errors from being send to global error handler. With the fix, errors occurring during export like OTLP Endpoint unresponsive shows up in stderr by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes true. Updated.
Changes
The
collect_and_export()
drops the error in case of failure during export, and always return success. Fixing that. Testing using end-to-end test for OTLP metrics exporter, with no collector running. Not adding the unit-test for now - can be done by creating a failing MockExporter (if required).Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes