Skip to content

Commit

Permalink
Small change to return error from periodic exporter (open-telemetry#1857
Browse files Browse the repository at this point in the history
)

Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
  • Loading branch information
lalitb and cijothomas authored Jun 4, 2024
1 parent 406cc31 commit f488006
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

## v0.23.0

- Fix SimpleSpanProcessor to be consistent with log counterpart. Also removed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/metrics/periodic_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl<RT: Runtime> PeriodicReaderWorker<RT> {
pin_mut!(timeout);

match future::select(export, timeout).await {
Either::Left(_) => Ok(()),
Either::Left((res, _)) => res, // return the result.
Either::Right(_) => Err(MetricsError::Other("export timed out".into())),
}
}
Expand Down

0 comments on commit f488006

Please sign in to comment.