From 7e7c5e73e2145dad701729ba08bf675cfbc225ef Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 16 Feb 2024 09:36:54 +0100 Subject: [PATCH 1/2] Remove support for surf HTTP client --- Cargo.toml | 1 - opentelemetry-http/CHANGELOG.md | 4 +- opentelemetry-http/Cargo.toml | 1 - opentelemetry-http/src/lib.rs | 60 ------------------- opentelemetry-jaeger/CHANGELOG.md | 1 + opentelemetry-jaeger/Cargo.toml | 5 +- opentelemetry-jaeger/README.md | 1 - .../exporter/config/collector/http_client.rs | 26 -------- .../src/exporter/config/collector/mod.rs | 12 ---- opentelemetry-jaeger/src/exporter/mod.rs | 2 - opentelemetry-jaeger/src/lib.rs | 5 -- .../tests/integration_test.rs | 11 ---- opentelemetry-otlp/CHANGELOG.md | 1 + opentelemetry-otlp/Cargo.toml | 2 - opentelemetry-otlp/src/exporter/http/mod.rs | 20 +------ opentelemetry-otlp/src/lib.rs | 2 - opentelemetry-zipkin/CHANGELOG.md | 4 ++ opentelemetry-zipkin/Cargo.toml | 2 - opentelemetry-zipkin/README.md | 7 +-- opentelemetry-zipkin/src/exporter/mod.rs | 24 +------- opentelemetry-zipkin/src/lib.rs | 7 +-- scripts/lint.sh | 2 - 22 files changed, 18 insertions(+), 182 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eae1d2b535..6fed372183 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,6 @@ rand = "0.8" reqwest = "0.11" serde = "1.0" serde_json = "1.0" -surf = "2.0" temp-env = "0.3.6" thiserror = "1" tonic = "0.11" diff --git a/opentelemetry-http/CHANGELOG.md b/opentelemetry-http/CHANGELOG.md index 32eb36bbff..67ccebbba3 100644 --- a/opentelemetry-http/CHANGELOG.md +++ b/opentelemetry-http/CHANGELOG.md @@ -4,9 +4,9 @@ ### Changed +- **Breaking** Remove built-in support for surf HTTP client [#1537](https://github.com/open-telemetry/opentelemetry-rust/pull/1537) - **Breaking** Surface non-2xx status codes as errors; change `ResponseExt` trait to return `HttpError` instead of `TraceError`[#1484](https://github.com/open-telemetry/opentelemetry-rust/pull/1484) - - + ## v0.10.0 ### Changed diff --git a/opentelemetry-http/Cargo.toml b/opentelemetry-http/Cargo.toml index 5263e32481..aa2cca8453 100644 --- a/opentelemetry-http/Cargo.toml +++ b/opentelemetry-http/Cargo.toml @@ -17,5 +17,4 @@ hyper = { workspace = true, features = ["http2", "client", "tcp"], optional = tr isahc = { workspace = true, optional = true } opentelemetry = { version = "0.21", path = "../opentelemetry", features = ["trace"] } reqwest = { workspace = true, features = ["blocking"], optional = true } -surf = { workspace = true, optional = true } tokio = { workspace = true, features = ["time"], optional = true } diff --git a/opentelemetry-http/src/lib.rs b/opentelemetry-http/src/lib.rs index 70acd11ff4..a4564e8810 100644 --- a/opentelemetry-http/src/lib.rs +++ b/opentelemetry-http/src/lib.rs @@ -100,66 +100,6 @@ mod reqwest { } } -#[cfg(feature = "surf")] -pub mod surf { - use std::str::FromStr; - - use http::{header::HeaderName, HeaderMap, HeaderValue}; - - use super::{async_trait, Bytes, HttpClient, HttpError, Request, Response, ResponseExt}; - - #[derive(Debug)] - pub struct BasicAuthMiddleware(pub surf::http::auth::BasicAuth); - - #[async_trait] - impl surf::middleware::Middleware for BasicAuthMiddleware { - async fn handle( - &self, - mut req: surf::Request, - client: surf::Client, - next: surf::middleware::Next<'_>, - ) -> surf::Result { - req.insert_header(self.0.name(), self.0.value()); - next.run(req, client).await - } - } - - #[async_trait] - impl HttpClient for surf::Client { - async fn send(&self, request: Request>) -> Result, HttpError> { - let (parts, body) = request.into_parts(); - let method = parts.method.as_str().parse()?; - let uri = parts.uri.to_string().parse()?; - - let mut request_builder = surf::Request::builder(method, uri).body(body); - let mut prev_name = None; - for (new_name, value) in parts.headers.into_iter() { - let name = new_name.or(prev_name).expect("the first time new_name should be set and from then on we always have a prev_name"); - request_builder = request_builder.header(name.as_str(), value.to_str()?); - prev_name = Some(name); - } - - let mut response = self.send(request_builder).await?; - let mut headers = HeaderMap::new(); - for header_name in response.header_names() { - for header_value in &response[header_name.to_string().as_str()] { - headers.append( - HeaderName::from_str(&header_name.to_string())?, - HeaderValue::from_str(header_value.as_str())?, - ); - } - } - let mut http_response = Response::builder() - .status(response.status() as u16) - .body(response.body_bytes().await?.into())?; - - *http_response.headers_mut() = headers; - - Ok(http_response.error_for_status()?) - } - } -} - #[cfg(feature = "isahc")] mod isahc { use crate::ResponseExt; diff --git a/opentelemetry-jaeger/CHANGELOG.md b/opentelemetry-jaeger/CHANGELOG.md index 8dfc170841..41e09308cb 100644 --- a/opentelemetry-jaeger/CHANGELOG.md +++ b/opentelemetry-jaeger/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed +- **Breaking** Remove support for surf HTTP client [#1537](https://github.com/open-telemetry/opentelemetry-rust/pull/1537) - Update to tonic 0.11 and prost 0.12 (#1536) ## v0.21.0 diff --git a/opentelemetry-jaeger/Cargo.toml b/opentelemetry-jaeger/Cargo.toml index e5794c2252..f11d918e06 100644 --- a/opentelemetry-jaeger/Cargo.toml +++ b/opentelemetry-jaeger/Cargo.toml @@ -35,7 +35,6 @@ opentelemetry-http = { version = "0.10", path = "../opentelemetry-http", optiona opentelemetry-semantic-conventions = { version = "0.13", path = "../opentelemetry-semantic-conventions" } pin-project-lite = { workspace = true, optional = true } reqwest = { workspace = true, optional = true } -surf = { workspace = true, optional = true } thrift = "0.17.0" tokio = { workspace = true, features = ["net", "sync"], optional = true } wasm-bindgen = { version = "0.2", optional = true } @@ -79,7 +78,6 @@ full = [ "reqwest_collector_client", "reqwest_blocking_collector_client", "reqwest_rustls_collector_client", - "surf_collector_client", "wasm_collector_client", "rt-tokio", "rt-tokio-current-thread", @@ -94,7 +92,6 @@ isahc_collector_client = ["isahc", "opentelemetry-http/isahc"] reqwest_blocking_collector_client = ["reqwest/blocking", "collector_client", "headers", "opentelemetry-http/reqwest"] reqwest_collector_client = ["reqwest", "collector_client", "headers", "opentelemetry-http/reqwest"] reqwest_rustls_collector_client = ["reqwest_collector_client", "reqwest/rustls-tls-native-roots"] -surf_collector_client = ["surf", "collector_client", "opentelemetry-http/surf"] wasm_collector_client = [ "base64", "http", @@ -107,4 +104,4 @@ wasm_collector_client = [ rt-tokio = ["tokio", "opentelemetry_sdk/rt-tokio"] rt-tokio-current-thread = ["tokio", "opentelemetry_sdk/rt-tokio-current-thread"] rt-async-std = ["async-std", "opentelemetry_sdk/rt-async-std"] -integration_test = ["tonic", "prost", "prost-types", "rt-tokio", "collector_client", "hyper_collector_client", "hyper_tls_collector_client", "reqwest_collector_client", "surf_collector_client", "isahc_collector_client"] +integration_test = ["tonic", "prost", "prost-types", "rt-tokio", "collector_client", "hyper_collector_client", "hyper_tls_collector_client", "reqwest_collector_client", "isahc_collector_client"] diff --git a/opentelemetry-jaeger/README.md b/opentelemetry-jaeger/README.md index aaa79ec4a9..d14539b803 100644 --- a/opentelemetry-jaeger/README.md +++ b/opentelemetry-jaeger/README.md @@ -113,7 +113,6 @@ Then you can use the [`with_collector_endpoint`] method to specify the endpoint: ```rust // Note that this requires one of the following features enabled so that there is a default http client implementation // * hyper_collector_client -// * surf_collector_client // * reqwest_collector_client // * reqwest_blocking_collector_client // * reqwest_rustls_collector_client diff --git a/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs b/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs index 14b84e7f09..bcdbc4f20c 100644 --- a/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs +++ b/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs @@ -9,8 +9,6 @@ pub(crate) enum CollectorHttpClient { Hyper, #[cfg(feature = "isahc_collector_client")] Isahc, - #[cfg(feature = "surf_collector_client")] - Surf, #[cfg(feature = "reqwest_collector_client")] Reqwest, #[cfg(feature = "reqwest_blocking_collector_client")] @@ -57,30 +55,6 @@ impl CollectorHttpClient { })?; Ok(Box::new(client)) } - #[cfg(feature = "surf_collector_client")] - CollectorHttpClient::Surf => { - use opentelemetry_http::surf::BasicAuthMiddleware; - - let client: surf::Client = surf::Config::new() - .set_timeout(Some(collector_timeout)) - .try_into() - .map_err(|err| crate::Error::ConfigError { - pipeline_name: "collector", - config_name: "http_client", - reason: format!("cannot create surf client. {}", err), - })?; - - let client = if let (Some(username), Some(password)) = - (collector_username, collector_password) - { - let auth = surf::http::auth::BasicAuth::new(username, password); - client.with(BasicAuthMiddleware(auth)) - } else { - client - }; - - Ok(Box::new(client)) - } #[cfg(feature = "reqwest_blocking_collector_client")] CollectorHttpClient::ReqwestBlocking => { use headers::authorization::Credentials; diff --git a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs index 676720b1fb..acdbd0b8a0 100644 --- a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs +++ b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs @@ -65,7 +65,6 @@ const ENV_PASSWORD: &str = "OTEL_EXPORTER_JAEGER_PASSWORD"; /// implementation and relative configurations. /// /// - [hyper], requires `hyper_collector_client` feature enabled, use [`with_hyper`][CollectorPipeline::with_hyper] function to setup. -/// - [surf], requires `surf_collector_client` feature enabled, use [`with_surf`][CollectorPipeline::with_surf] function to setup. /// - [isahc], requires `isahc_collector_client` feature enabled, use [`with_isahc`][CollectorPipeline::with_isahc] function to setup. /// - [reqwest], requires `reqwest_collector_client` feature enabled, use [`with_reqwest`][CollectorPipeline::with_reqwest] function to setup. /// - [reqwest blocking client], requires `reqwest_blocking_collector_client` feature enabled, use [`with_reqwest_blocking`][CollectorPipeline::with_surf] function to setup. @@ -277,17 +276,6 @@ impl CollectorPipeline { } } - /// Use surf http client in the exporter. - #[cfg(feature = "surf_collector_client")] - pub fn with_surf(self) -> Self { - Self { - client_config: ClientConfig::Http { - client_type: CollectorHttpClient::Surf, - }, - ..self - } - } - /// Use reqwest http client in the exporter. #[cfg(feature = "reqwest_collector_client")] pub fn with_reqwest(self) -> Self { diff --git a/opentelemetry-jaeger/src/exporter/mod.rs b/opentelemetry-jaeger/src/exporter/mod.rs index 9bc1d91d3c..156503fa20 100644 --- a/opentelemetry-jaeger/src/exporter/mod.rs +++ b/opentelemetry-jaeger/src/exporter/mod.rs @@ -2,8 +2,6 @@ //! // Linting isn't detecting that it's used seems like linting bug. #[allow(unused_imports)] -#[cfg(feature = "surf_collector_client")] -use std::convert::TryFrom; use std::convert::TryInto; use std::fmt::Display; use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr}; diff --git a/opentelemetry-jaeger/src/lib.rs b/opentelemetry-jaeger/src/lib.rs index 151dab020c..4bbd08380d 100644 --- a/opentelemetry-jaeger/src/lib.rs +++ b/opentelemetry-jaeger/src/lib.rs @@ -232,9 +232,6 @@ //! .with_resource(Resource::new(vec![KeyValue::new("key", "value"), //! KeyValue::new("process_key", "process_value")])), //! ) -//! // we config a surf http client with 2 seconds timeout -//! // and have basic authentication header with username=username, password=s3cr3t -//! .with_isahc() // requires `isahc_collector_client` feature //! .with_username("username") //! .with_password("s3cr3t") //! .with_timeout(std::time::Duration::from_secs(2)) @@ -259,8 +256,6 @@ //! //! * `hyper_collector_client`: Export span data with Jaeger collector backed by a hyper default http client. //! -//! * `surf_collector_client`: Export span data with Jaeger collector backed by a surf default http client. -//! //! * `reqwest_collector_client`: Export span data with Jaeger collector backed by a reqwest http client. //! //! * `reqwest_blocking_collector_client`: Export span data with Jaeger collector backed by a reqwest blocking http client. diff --git a/opentelemetry-jaeger/tests/integration_test.rs b/opentelemetry-jaeger/tests/integration_test.rs index 05e755816b..83dcc14978 100644 --- a/opentelemetry-jaeger/tests/integration_test.rs +++ b/opentelemetry-jaeger/tests/integration_test.rs @@ -101,17 +101,6 @@ mod tests { .expect("cannot create tracer using default configuration") }), ), - ( - "collector_surf", - Box::new(|| { - opentelemetry_jaeger::new_collector_pipeline() - .with_endpoint(collector_endpoint) - .with_surf() - .with_service_name(format!("{}-{}", SERVICE_NAME, "collector_surf")) - .install_batch(opentelemetry_sdk::runtime::Tokio) - .expect("cannot create tracer using default configuration") - }), - ), ( "collector_hyper", Box::new(|| { diff --git a/opentelemetry-otlp/CHANGELOG.md b/opentelemetry-otlp/CHANGELOG.md index 8b740e17f1..5a79ab9d23 100644 --- a/opentelemetry-otlp/CHANGELOG.md +++ b/opentelemetry-otlp/CHANGELOG.md @@ -2,6 +2,7 @@ ## vNext +- **Breaking** Remove support for surf HTTP client [#1537](https://github.com/open-telemetry/opentelemetry-rust/pull/1537) - Update to tonic 0.11 and prost 0.12 (#1536) - Remove support for grpcio transport (#1534) diff --git a/opentelemetry-otlp/Cargo.toml b/opentelemetry-otlp/Cargo.toml index d8e1951ac9..011c703995 100644 --- a/opentelemetry-otlp/Cargo.toml +++ b/opentelemetry-otlp/Cargo.toml @@ -39,7 +39,6 @@ tonic = { workspace = true, optional = true } tokio = { workspace = true, features = ["sync", "rt"], optional = true } reqwest = { workspace = true, optional = true } -surf = { workspace = true, optional = true } http = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"], optional = true } thiserror = { workspace = true } @@ -74,7 +73,6 @@ http-proto = ["prost", "opentelemetry-http", "opentelemetry-proto/gen-tonic-mess reqwest-blocking-client = ["reqwest/blocking", "opentelemetry-http/reqwest"] reqwest-client = ["reqwest", "opentelemetry-http/reqwest"] reqwest-rustls = ["reqwest", "reqwest/rustls-tls-native-roots"] -surf-client = ["surf", "opentelemetry-http/surf"] # test integration-testing = ["tonic", "prost", "tokio/full", "trace"] diff --git a/opentelemetry-otlp/src/exporter/http/mod.rs b/opentelemetry-otlp/src/exporter/http/mod.rs index d26d1302ca..be6ea03f11 100644 --- a/opentelemetry-otlp/src/exporter/http/mod.rs +++ b/opentelemetry-otlp/src/exporter/http/mod.rs @@ -27,7 +27,6 @@ mod trace; #[cfg_attr( all( not(feature = "reqwest-client"), - not(feature = "surf-client"), not(feature = "reqwest-blocking-client") ), derive(Default) @@ -40,31 +39,16 @@ pub(crate) struct HttpConfig { headers: Option>, } -#[cfg(any( - feature = "reqwest-blocking-client", - feature = "reqwest-client", - feature = "surf-client" -))] +#[cfg(any(feature = "reqwest-blocking-client", feature = "reqwest-client",))] impl Default for HttpConfig { fn default() -> Self { HttpConfig { #[cfg(feature = "reqwest-blocking-client")] client: Some(Arc::new(reqwest::blocking::Client::new())), - #[cfg(all( - not(feature = "reqwest-blocking-client"), - not(feature = "surf-client"), - feature = "reqwest-client" - ))] + #[cfg(all(not(feature = "reqwest-blocking-client"), feature = "reqwest-client"))] client: Some(Arc::new(reqwest::Client::new())), #[cfg(all( not(feature = "reqwest-client"), - not(feature = "reqwest-blocking-client"), - feature = "surf-client" - ))] - client: Some(Arc::new(surf::Client::new())), - #[cfg(all( - not(feature = "reqwest-client"), - not(feature = "surf-client"), not(feature = "reqwest-blocking-client") ))] client: None, diff --git a/opentelemetry-otlp/src/lib.rs b/opentelemetry-otlp/src/lib.rs index 20bddb7c38..0b96ae039d 100644 --- a/opentelemetry-otlp/src/lib.rs +++ b/opentelemetry-otlp/src/lib.rs @@ -104,8 +104,6 @@ //! * `reqwest-blocking-client`: Use reqwest blocking http client. //! * `reqwest-client`: Use reqwest http client. //! * `reqwest-rustls`: Use reqwest with TLS. -//! * `surf-client`: Use surf http client. -//! //! //! # Kitchen Sink Full Configuration //! diff --git a/opentelemetry-zipkin/CHANGELOG.md b/opentelemetry-zipkin/CHANGELOG.md index f4d6dfbade..171d011257 100644 --- a/opentelemetry-zipkin/CHANGELOG.md +++ b/opentelemetry-zipkin/CHANGELOG.md @@ -2,6 +2,10 @@ ## vNext +### Changed + +- **Breaking** Remove support for surf HTTP client [#1537](https://github.com/open-telemetry/opentelemetry-rust/pull/1537) + ## v0.19.0 ### Changed diff --git a/opentelemetry-zipkin/Cargo.toml b/opentelemetry-zipkin/Cargo.toml index 23151f5d10..2d66d887de 100644 --- a/opentelemetry-zipkin/Cargo.toml +++ b/opentelemetry-zipkin/Cargo.toml @@ -24,7 +24,6 @@ default = ["reqwest-blocking-client", "reqwest/native-tls"] reqwest-blocking-client = ["reqwest/blocking", "opentelemetry-http/reqwest"] reqwest-client = ["reqwest", "opentelemetry-http/reqwest"] reqwest-rustls = ["reqwest", "reqwest/rustls-tls-native-roots"] -surf-client = ["surf", "opentelemetry-http/surf"] [dependencies] async-trait = { workspace = true } @@ -38,7 +37,6 @@ serde = { workspace = true, features = ["derive"] } typed-builder = "0.12" http = { workspace = true } reqwest = { workspace = true, optional = true} -surf = { workspace = true, optional = true} thiserror = { workspace = true } futures-core = { workspace = true } diff --git a/opentelemetry-zipkin/README.md b/opentelemetry-zipkin/README.md index 5217a31740..decfa89fa7 100644 --- a/opentelemetry-zipkin/README.md +++ b/opentelemetry-zipkin/README.md @@ -50,7 +50,7 @@ fn main() -> Result<(), Box> { tracer.in_span("doing_work", |cx| { // Traced app logic here... }); - + global::shutdown_tracer_provider(); Ok(()) @@ -86,9 +86,8 @@ a manual implementation of the [`HttpClient`] trait. By default the `reqwest-blocking-client` feature is enabled which will use the `reqwest` crate. While this is compatible with both async and non-async projects, it is not optimal for high-performance async applications as it will block the executor -thread. Consider using the `reqwest-client` (without blocking) or `surf-client` -features if you are in the `tokio` or `async-std` ecosystems respectively, or -select whichever client you prefer as shown below. +thread. Consider using the `reqwest-client` (without blocking) if you are in +the `tokio` ecosystem. Note that async http clients may require a specific async runtime to be available so be sure to match them appropriately. diff --git a/opentelemetry-zipkin/src/exporter/mod.rs b/opentelemetry-zipkin/src/exporter/mod.rs index 5f40bda53d..1fdc602cca 100644 --- a/opentelemetry-zipkin/src/exporter/mod.rs +++ b/opentelemetry-zipkin/src/exporter/mod.rs @@ -17,12 +17,6 @@ use opentelemetry_sdk::{ }; use opentelemetry_semantic_conventions as semcov; use std::borrow::Cow; -#[cfg(all( - not(feature = "reqwest-client"), - not(feature = "reqwest-blocking-client"), - feature = "surf-client" -))] -use std::convert::TryFrom; use std::net::SocketAddr; use std::sync::Arc; use std::time::Duration; @@ -69,11 +63,7 @@ impl Default for ZipkinPipelineBuilder { .build() .unwrap_or_else(|_| reqwest::blocking::Client::new()), )), - #[cfg(all( - not(feature = "reqwest-blocking-client"), - not(feature = "surf-client"), - feature = "reqwest-client" - ))] + #[cfg(all(not(feature = "reqwest-blocking-client"), feature = "reqwest-client"))] client: Some(Arc::new( reqwest::Client::builder() .timeout(timeout) @@ -82,16 +72,6 @@ impl Default for ZipkinPipelineBuilder { )), #[cfg(all( not(feature = "reqwest-client"), - not(feature = "reqwest-blocking-client"), - feature = "surf-client" - ))] - client: Some(Arc::new( - surf::Client::try_from(surf::Config::new().set_timeout(Some(timeout))) - .unwrap_or_else(|_| surf::Client::new()), - )), - #[cfg(all( - not(feature = "reqwest-client"), - not(feature = "surf-client"), not(feature = "reqwest-blocking-client") ))] client: None, @@ -262,7 +242,7 @@ impl trace::SpanExporter for Exporter { #[non_exhaustive] pub enum Error { /// No http client implementation found. User should provide one or enable features. - #[error("http client must be set, users can enable reqwest or surf feature to use http client implementation within create")] + #[error("http client must be set, users can enable reqwest feature to use http client implementation within create")] NoHttpClient, /// Http requests failed diff --git a/opentelemetry-zipkin/src/lib.rs b/opentelemetry-zipkin/src/lib.rs index ae7763c2cb..d884ab740a 100644 --- a/opentelemetry-zipkin/src/lib.rs +++ b/opentelemetry-zipkin/src/lib.rs @@ -71,9 +71,7 @@ //! crate. While this is compatible with both async and non-async projects, it //! is not optimal for high-performance async applications as it will block the //! executor thread. Consider using the `reqwest-client` (without blocking) -//! or `surf-client` features if you are in the `tokio` or `async-std` -//! ecosystems respectively, or select whichever client you prefer as shown -//! below. +//! if you are in the `tokio` ecosystem. //! //! Note that async http clients may require a specific async runtime to be //! available so be sure to match them appropriately. @@ -99,7 +97,7 @@ //! use std::error::Error; //! use hyper::{client::HttpConnector, Body}; //! -//! // `reqwest` and `surf` are supported through features, if you prefer an +//! // `reqwest` is supported through a feature, if you prefer an //! // alternate http client you can add support by implementing `HttpClient` as //! // shown here. //! #[derive(Debug)] @@ -161,7 +159,6 @@ //! * `reqwest-blocking-client`: Export spans using the reqwest blocking http //! client (enabled by default). //! * `reqwest-client`: Export spans using the reqwest non-blocking http client. -//! * `surf-client`: Export spans using the surf non-blocking http client. //! //! ## Supported Rust Versions //! diff --git a/scripts/lint.sh b/scripts/lint.sh index c14b57f5c3..130d983c6c 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -23,10 +23,8 @@ if rustup component add clippy; then cargo_feature opentelemetry-otlp "http-proto, reqwest-blocking-client" cargo_feature opentelemetry-otlp "http-proto, reqwest-client" cargo_feature opentelemetry-otlp "http-proto, reqwest-rustls" - cargo_feature opentelemetry-otlp "http-proto, surf-client, surf/curl-client" cargo_feature opentelemetry-otlp "metrics" - cargo_feature opentelemetry-jaeger "surf_collector_client, surf/curl-client" cargo_feature opentelemetry-jaeger "isahc_collector_client" cargo_feature opentelemetry-jaeger "reqwest_blocking_collector_client" cargo_feature opentelemetry-jaeger "reqwest_collector_client" From 2ac28da127b81d6c2eda2cf9a512a2e0dfff2f3e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 16 Feb 2024 09:55:31 +0100 Subject: [PATCH 2/2] Fix docs reference to with_reqwest_blocking() --- opentelemetry-jaeger/src/exporter/config/collector/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs index acdbd0b8a0..13b76efdb5 100644 --- a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs +++ b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs @@ -67,7 +67,7 @@ const ENV_PASSWORD: &str = "OTEL_EXPORTER_JAEGER_PASSWORD"; /// - [hyper], requires `hyper_collector_client` feature enabled, use [`with_hyper`][CollectorPipeline::with_hyper] function to setup. /// - [isahc], requires `isahc_collector_client` feature enabled, use [`with_isahc`][CollectorPipeline::with_isahc] function to setup. /// - [reqwest], requires `reqwest_collector_client` feature enabled, use [`with_reqwest`][CollectorPipeline::with_reqwest] function to setup. -/// - [reqwest blocking client], requires `reqwest_blocking_collector_client` feature enabled, use [`with_reqwest_blocking`][CollectorPipeline::with_surf] function to setup. +/// - [reqwest blocking client], requires `reqwest_blocking_collector_client` feature enabled, use [`with_reqwest_blocking`][CollectorPipeline::with_reqwest_blocking] function to setup. /// /// Additionally you can enable https ///