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

Removed futures-channel from opentelemetry dependencies #1229

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion opentelemetry-stackdriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ impl StackDriverExporter {
impl SpanExporter for StackDriverExporter {
fn export(&mut self, batch: Vec<SpanData>) -> BoxFuture<'static, ExportResult> {
match self.tx.try_send(batch) {
Err(e) => Box::pin(std::future::ready(Err(e.into()))),
Err(e) => Box::pin(std::future::ready(Err(TraceError::Other(Box::new(
e.into_send_error(),
))))),
Ok(()) => {
self.pending_count.fetch_add(1, Ordering::Relaxed);
Box::pin(std::future::ready(Ok(())))
Expand Down
3 changes: 3 additions & 0 deletions opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ This release should been seen as 1.0-rc3 following 1.0-rc2 in v0.19.0. Refer to
- Drop include_trace_context parameter from Logs API/SDK. [#1133](https://github.com/open-telemetry/opentelemetry-rust/issues/1133)
- Synchronous instruments no longer accepts `Context` while reporting
measurements. [#1076](https://github.com/open-telemetry/opentelemetry-rust/pull/1076).
- Fallible conversions from `futures-channel` error types to `LogError` and
`TraceError` removed.
[#1201](https://github.com/open-telemetry/opentelemetry-rust/issues/1201)

### Fixed

Expand Down
1 change: 0 additions & 1 deletion opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
indexmap = "2.0"
once_cell = "1.12.0"
Expand Down
13 changes: 0 additions & 13 deletions opentelemetry/src/logs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! # OpenTelemetry Logs API

use crate::ExportError;
use futures_channel::{mpsc::TrySendError, oneshot::Canceled};
use std::time::Duration;
use thiserror::Error;

Expand Down Expand Up @@ -42,18 +41,6 @@ where
}
}

impl<T> From<TrySendError<T>> for LogError {
fn from(err: TrySendError<T>) -> Self {
LogError::Other(Box::new(err.into_send_error()))
}
}

impl From<Canceled> for LogError {
fn from(err: Canceled) -> Self {
LogError::Other(Box::new(err))
}
}

impl From<String> for LogError {
fn from(err_msg: String) -> Self {
LogError::Other(Box::new(Custom(err_msg)))
Expand Down
13 changes: 0 additions & 13 deletions opentelemetry/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
//! some_work().with_context(Context::current_with_span(span));
//! ```

use futures_channel::{mpsc::TrySendError, oneshot::Canceled};
use std::borrow::Cow;
use std::time;
use thiserror::Error;
Expand Down Expand Up @@ -218,18 +217,6 @@ where
}
}

impl<T> From<TrySendError<T>> for TraceError {
fn from(err: TrySendError<T>) -> Self {
TraceError::Other(Box::new(err.into_send_error()))
}
}

impl From<Canceled> for TraceError {
fn from(err: Canceled) -> Self {
TraceError::Other(Box::new(err))
}
}

impl From<String> for TraceError {
fn from(err_msg: String) -> Self {
TraceError::Other(Box::new(Custom(err_msg)))
Expand Down