diff --git a/opentelemetry-jaeger/Cargo.toml b/opentelemetry-jaeger/Cargo.toml index b1d6874b75..1e2c77f658 100644 --- a/opentelemetry-jaeger/Cargo.toml +++ b/opentelemetry-jaeger/Cargo.toml @@ -29,7 +29,7 @@ hyper = { version = "0.14", default-features = false, features = ["client"], opt hyper-tls = { version = "0.5.0", default-features = false, optional = true } isahc = { version = "1.4", default-features = false, optional = true } js-sys = { version = "0.3", optional = true } -opentelemetry_api = { version = "0.20", default-features = false, features = ["trace"], path = "../opentelemetry-api" } +opentelemetry = { version = "0.21", default-features = false, features = ["trace"], path = "../opentelemetry" } opentelemetry_sdk = { version = "0.20", default-features = false, features = ["trace"], path = "../opentelemetry-sdk" } opentelemetry-http = { version = "0.9", path = "../opentelemetry-http", optional = true } opentelemetry-semantic-conventions = { version = "0.12", path = "../opentelemetry-semantic-conventions" } @@ -54,7 +54,7 @@ futures-util = { version = "0.3", default-features = false, features = ["std", " tokio = { version = "1.0", features = ["net", "sync"] } bytes = "1" futures-executor = "0.3" -opentelemetry_sdk = { default-features = false, features = ["trace", "testing"], path = "../opentelemetry-sdk" } +opentelemetry_sdk = { features = ["trace", "testing", "rt-tokio"], path = "../opentelemetry-sdk" } [dependencies.web-sys] version = "0.3.4" diff --git a/opentelemetry-jaeger/src/exporter/config/agent.rs b/opentelemetry-jaeger/src/exporter/config/agent.rs index 01108019e2..36d928e30b 100644 --- a/opentelemetry-jaeger/src/exporter/config/agent.rs +++ b/opentelemetry-jaeger/src/exporter/config/agent.rs @@ -5,7 +5,7 @@ use crate::exporter::config::{ }; use crate::exporter::uploader::{AsyncUploader, SyncUploader, Uploader}; use crate::{Error, Exporter, JaegerTraceRuntime}; -use opentelemetry_api::trace::TraceError; +use opentelemetry::trace::TraceError; use opentelemetry_sdk::trace::{BatchSpanProcessor, Tracer}; use opentelemetry_sdk::{ self, @@ -46,21 +46,20 @@ const DEFAULT_AGENT_ENDPOINT_PORT: &str = "6831"; /// Set `auto_split_batch` to true will config the exporter to split the batch based on `max_packet_size` /// automatically. Note that it has a performance overhead as every batch could require multiple requests to export. /// -/// /// For example, OSX UDP packet limit is 9216 by default. You can configure the pipeline as following /// to avoid UDP packet breaches the limit. -///```no_run -/// # use opentelemetry::trace::TraceError; -/// # fn main() -> Result<(), TraceError>{ -/// let tracer = opentelemetry_jaeger::new_agent_pipeline() +/// +/// ```no_run +/// # use opentelemetry_sdk::runtime::Tokio; +/// # fn main() { +/// let tracer = opentelemetry_jaeger::new_agent_pipeline() /// .with_endpoint("localhost:6831") /// .with_service_name("my_app") /// .with_max_packet_size(9_216) /// .with_auto_split_batch(true) -/// .install_batch(opentelemetry_sdk::runtime::Tokio).unwrap(); -/// # Ok(()) +/// .install_batch(Tokio).unwrap(); /// # } -///``` +/// ``` /// /// [`with_auto_split_batch`]: AgentPipeline::with_auto_split_batch /// [`with_max_packet_size`]: AgentPipeline::with_max_packet_size @@ -234,7 +233,8 @@ impl AgentPipeline { /// # Examples /// Set service name via resource. /// ```rust - /// use opentelemetry::{sdk::{self, Resource}, KeyValue}; + /// use opentelemetry::KeyValue; + /// use opentelemetry_sdk::{Resource, trace::Config}; /// /// let pipeline = opentelemetry_jaeger::new_agent_pipeline() /// .with_trace_config( @@ -256,7 +256,7 @@ impl AgentPipeline { /// # Examples /// Set max queue size. /// ```rust - /// use opentelemetry::BatchConfig; + /// use opentelemetry_sdk::trace::BatchConfig; /// /// let pipeline = opentelemetry_jaeger::new_agent_pipeline() /// .with_batch_processor_config( diff --git a/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs b/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs index f55d328133..7cfa65dcf7 100644 --- a/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs +++ b/opentelemetry-jaeger/src/exporter/config/collector/http_client.rs @@ -185,7 +185,7 @@ mod collector_client_tests { use crate::config::collector::http_client::test_http_client; use crate::exporter::thrift::jaeger::Batch; use crate::new_collector_pipeline; - use opentelemetry_api::trace::TraceError; + use opentelemetry::trace::TraceError; use opentelemetry_sdk::runtime::Tokio; #[test] diff --git a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs index d3a413ba09..a97b3b087d 100644 --- a/opentelemetry-jaeger/src/exporter/config/collector/mod.rs +++ b/opentelemetry-jaeger/src/exporter/config/collector/mod.rs @@ -5,7 +5,7 @@ use crate::exporter::config::{ use crate::exporter::uploader::{AsyncUploader, Uploader}; use crate::{Exporter, JaegerTraceRuntime}; use http::Uri; -use opentelemetry_api::trace::TraceError; +use opentelemetry::trace::TraceError; use opentelemetry_sdk::trace::{BatchConfig, BatchSpanProcessor, Config, Tracer, TracerProvider}; use std::borrow::BorrowMut; use std::convert::TryFrom; @@ -391,11 +391,12 @@ impl CollectorPipeline { /// # Examples /// Set service name via resource. /// ```rust - /// use opentelemetry::{sdk::{self, Resource}, KeyValue}; + /// use opentelemetry::KeyValue; + /// use opentelemetry_sdk::{Resource, trace::Config}; /// /// let pipeline = opentelemetry_jaeger::new_collector_pipeline() /// .with_trace_config( - /// sdk::trace::Config::default() + /// Config::default() /// .with_resource(Resource::new(vec![KeyValue::new("service.name", "my-service")])) /// ); /// diff --git a/opentelemetry-jaeger/src/exporter/config/mod.rs b/opentelemetry-jaeger/src/exporter/config/mod.rs index 12df7e6b39..ea598b417d 100644 --- a/opentelemetry-jaeger/src/exporter/config/mod.rs +++ b/opentelemetry-jaeger/src/exporter/config/mod.rs @@ -10,7 +10,7 @@ //! [jaeger deployment guide]: https://www.jaegertracing.io/docs/1.31/deployment use crate::Process; -use opentelemetry_api::{global, trace::TraceError, KeyValue}; +use opentelemetry::{global, trace::TraceError, KeyValue}; use opentelemetry_sdk::trace::{BatchConfig, Config, Tracer, TracerProvider}; use opentelemetry_semantic_conventions as semcov; @@ -86,7 +86,7 @@ fn build_config_and_process( mod tests { use crate::exporter::config::build_config_and_process; use crate::new_agent_pipeline; - use opentelemetry_api::KeyValue; + use opentelemetry::KeyValue; use opentelemetry_sdk::{trace::Config, Resource}; use std::env; @@ -119,7 +119,7 @@ mod tests { pub(crate) fn install_tracer_provider_and_get_tracer( tracer_provider: TracerProvider, ) -> Result { - let tracer = opentelemetry_api::trace::TracerProvider::versioned_tracer( + let tracer = opentelemetry::trace::TracerProvider::versioned_tracer( &tracer_provider, "opentelemetry-jaeger", Some(env!("CARGO_PKG_VERSION")), diff --git a/opentelemetry-jaeger/src/exporter/mod.rs b/opentelemetry-jaeger/src/exporter/mod.rs index 31af54db9c..e942c8669d 100644 --- a/opentelemetry-jaeger/src/exporter/mod.rs +++ b/opentelemetry-jaeger/src/exporter/mod.rs @@ -20,7 +20,7 @@ use self::runtime::JaegerTraceRuntime; use self::thrift::jaeger; use crate::exporter::uploader::Uploader; use futures_core::future::BoxFuture; -use opentelemetry_api::{ +use opentelemetry::{ trace::{Event, Link, SpanKind, Status}, InstrumentationLibrary, Key, KeyValue, }; @@ -357,7 +357,7 @@ mod tests { use super::SPAN_KIND; use crate::exporter::thrift::jaeger::Tag; use crate::exporter::{build_span_tags, OTEL_STATUS_CODE, OTEL_STATUS_DESCRIPTION}; - use opentelemetry_api::{ + use opentelemetry::{ trace::{SpanKind, Status}, KeyValue, }; diff --git a/opentelemetry-jaeger/src/exporter/thrift/mod.rs b/opentelemetry-jaeger/src/exporter/thrift/mod.rs index 741752c25b..c6916fb592 100644 --- a/opentelemetry-jaeger/src/exporter/thrift/mod.rs +++ b/opentelemetry-jaeger/src/exporter/thrift/mod.rs @@ -2,7 +2,7 @@ //! //! Definitions: -use opentelemetry_api::{trace::Event, Key, KeyValue, Value}; +use opentelemetry::{trace::Event, Key, KeyValue, Value}; use std::time::{Duration, SystemTime}; pub(crate) mod agent; diff --git a/opentelemetry-jaeger/src/lib.rs b/opentelemetry-jaeger/src/lib.rs index 6278593d83..205b84c9aa 100644 --- a/opentelemetry-jaeger/src/lib.rs +++ b/opentelemetry-jaeger/src/lib.rs @@ -28,11 +28,10 @@ //! exporting telemetry: //! //! ```no_run -//! use opentelemetry::trace::Tracer; -//! use opentelemetry::global; +//! use opentelemetry::{global, trace::{Tracer, TraceError}}; //! //! #[tokio::main] -//! async fn main() -> Result<(), opentelemetry::trace::TraceError> { +//! async fn main() -> Result<(), TraceError> { //! global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); //! let tracer = opentelemetry_jaeger::new_agent_pipeline().install_simple()?; //! @@ -48,11 +47,10 @@ //! //! Or if you are running on an async runtime like Tokio and want to report spans in batches //! ```no_run -//! use opentelemetry::trace::Tracer; -//! use opentelemetry::global; +//! use opentelemetry::{global, trace::{Tracer, TraceError}}; //! use opentelemetry_sdk::runtime::Tokio; //! -//! fn main() -> Result<(), opentelemetry::trace::TraceError> { +//! fn main() -> Result<(), TraceError> { //! global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); //! let tracer = opentelemetry_jaeger::new_agent_pipeline().install_batch(Tokio)?; //! @@ -75,7 +73,7 @@ //! //! ```toml //! [dependencies] -//! opentelemetry = { version = "*", features = ["rt-tokio"] } +//! opentelemetry_sdk = { version = "*", features = ["rt-tokio"] } //! opentelemetry-jaeger = { version = "*", features = ["rt-tokio"] } //! ``` //! @@ -174,7 +172,8 @@ //! //! ### Export to agents //! ```no_run -//! use opentelemetry::{sdk::{trace::{self, RandomIdGenerator, Sampler}, Resource}, global, KeyValue, trace::{Tracer, TraceError}}; +//! use opentelemetry::{global, KeyValue, trace::{Tracer, TraceError}}; +//! use opentelemetry_sdk::{trace::{config, RandomIdGenerator, Sampler}, Resource}; //! //! fn main() -> Result<(), TraceError> { //! global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); @@ -185,7 +184,7 @@ //! .with_auto_split_batch(true) //! .with_instrumentation_library_tags(false) //! .with_trace_config( -//! trace::config() +//! config() //! .with_sampler(Sampler::AlwaysOn) //! .with_id_generator(RandomIdGenerator::default()) //! .with_max_events_per_span(64) @@ -210,7 +209,8 @@ //! ### Export to collectors //! Note that this example requires `collecotr_client` and `isahc_collector_client` feature. //! ```ignore -//! use opentelemetry::{sdk::{trace::{self, RandomIdGenerator, Sampler}, Resource}, global, KeyValue, trace::{Tracer, TraceError}}; +//! use opentelemetry::{global, KeyValue, trace::{Tracer, TraceError}}; +//! use opentelemetry_sdk{trace::{config, RandomIdGenerator, Sampler}, Resource}; //! //! fn main() -> Result<(), TraceError> { //! global::set_text_map_propagator(opentelemetry_jaeger::Propagator::new()); @@ -218,7 +218,7 @@ //! .with_endpoint("http://localhost:14250/api/trace") // set collector endpoint //! .with_service_name("my_app") // the name of the application //! .with_trace_config( -//! trace::config() +//! config() //! .with_sampler(Sampler::AlwaysOn) //! .with_id_generator(RandomIdGenerator::default()) //! .with_max_events_per_span(64) @@ -331,7 +331,7 @@ mod exporter; pub mod testing; mod propagator { - use opentelemetry_api::{ + use opentelemetry::{ global::{self, Error}, propagation::{text_map_propagator::FieldIter, Extractor, Injector, TextMapPropagator}, trace::{ @@ -583,7 +583,7 @@ mod propagator { #[cfg(test)] mod tests { use super::*; - use opentelemetry_api::{ + use opentelemetry::{ propagation::{Injector, TextMapPropagator}, testing::trace::TestSpan, trace::{SpanContext, SpanId, TraceContextExt, TraceFlags, TraceId, TraceState}, diff --git a/opentelemetry-jaeger/tests/integration_test.rs b/opentelemetry-jaeger/tests/integration_test.rs index 9e742a05f8..16d8ef9d12 100644 --- a/opentelemetry-jaeger/tests/integration_test.rs +++ b/opentelemetry-jaeger/tests/integration_test.rs @@ -1,6 +1,6 @@ #[cfg(feature = "integration_test")] mod tests { - use opentelemetry_api::{ + use opentelemetry::{ trace::{Status, TraceContextExt, Tracer}, KeyValue, }; diff --git a/opentelemetry-semantic-conventions/Cargo.toml b/opentelemetry-semantic-conventions/Cargo.toml index e4f26a9d5b..de12786742 100644 --- a/opentelemetry-semantic-conventions/Cargo.toml +++ b/opentelemetry-semantic-conventions/Cargo.toml @@ -20,4 +20,4 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -opentelemetry_api = { version = "0.20", default-features = false, path = "../opentelemetry-api" } \ No newline at end of file +opentelemetry = { version = "0.21", default-features = false, path = "../opentelemetry" } \ No newline at end of file diff --git a/opentelemetry-semantic-conventions/src/resource.rs b/opentelemetry-semantic-conventions/src/resource.rs index b3f752a088..1e2623aa8f 100644 --- a/opentelemetry-semantic-conventions/src/resource.rs +++ b/opentelemetry-semantic-conventions/src/resource.rs @@ -14,18 +14,18 @@ //! ## Usage //! //! ``` -//! use opentelemetry::sdk; +//! use opentelemetry_sdk{trace::{config, TracerProvider}}; //! use opentelemetry_semantic_conventions as semconv; //! -//! let _tracer = sdk::trace::TracerProvider::builder() -//! .with_config(sdk::trace::config().with_resource(sdk::Resource::new(vec![ +//! let _tracer = TracerProvider::builder() +//! .with_config(config().with_resource(Resource::new(vec![ //! semconv::resource::SERVICE_NAME.string("my-service"), //! semconv::resource::SERVICE_NAMESPACE.string("my-namespace"), //! ]))) //! .build(); //! ``` -use opentelemetry_api::Key; +use opentelemetry::Key; /// Array of brand name and version separated by a space. /// diff --git a/opentelemetry-semantic-conventions/src/trace.rs b/opentelemetry-semantic-conventions/src/trace.rs index 58c9d66fad..7935cb6552 100644 --- a/opentelemetry-semantic-conventions/src/trace.rs +++ b/opentelemetry-semantic-conventions/src/trace.rs @@ -27,7 +27,7 @@ //! .start(&tracer); //! ``` -use opentelemetry_api::Key; +use opentelemetry::Key; /// Client address - unix domain socket name, IPv4 or IPv6 address. /// diff --git a/opentelemetry-zipkin/Cargo.toml b/opentelemetry-zipkin/Cargo.toml index e9e13ffd43..7969542f12 100644 --- a/opentelemetry-zipkin/Cargo.toml +++ b/opentelemetry-zipkin/Cargo.toml @@ -28,7 +28,7 @@ surf-client = ["surf", "opentelemetry-http/surf"] [dependencies] async-trait = "0.1" -opentelemetry_api = { version = "0.20", path = "../opentelemetry-api" } +opentelemetry = { version = "0.21", path = "../opentelemetry" } opentelemetry_sdk = { version = "0.20", path = "../opentelemetry-sdk", features = ["trace"] } opentelemetry-http = { version = "0.9", path = "../opentelemetry-http" } opentelemetry-semantic-conventions = { version = "0.12", path = "../opentelemetry-semantic-conventions" } diff --git a/opentelemetry-zipkin/examples/zipkin.rs b/opentelemetry-zipkin/examples/zipkin.rs index a8b165a832..48c902a928 100644 --- a/opentelemetry-zipkin/examples/zipkin.rs +++ b/opentelemetry-zipkin/examples/zipkin.rs @@ -1,4 +1,4 @@ -use opentelemetry_api::{ +use opentelemetry::{ global::{self, shutdown_tracer_provider}, trace::{Span, Tracer}, }; diff --git a/opentelemetry-zipkin/src/exporter/mod.rs b/opentelemetry-zipkin/src/exporter/mod.rs index d6244845d6..54eea89008 100644 --- a/opentelemetry-zipkin/src/exporter/mod.rs +++ b/opentelemetry-zipkin/src/exporter/mod.rs @@ -6,7 +6,7 @@ use async_trait::async_trait; use futures_core::future::BoxFuture; use http::Uri; use model::endpoint::Endpoint; -use opentelemetry_api::{global, trace::TraceError, KeyValue}; +use opentelemetry::{global, trace::TraceError, KeyValue}; use opentelemetry_http::HttpClient; use opentelemetry_sdk::{ export::{trace, ExportError}, @@ -171,7 +171,7 @@ impl ZipkinPipelineBuilder { let mut provider_builder = TracerProvider::builder().with_simple_exporter(exporter); provider_builder = provider_builder.with_config(config); let provider = provider_builder.build(); - let tracer = opentelemetry_api::trace::TracerProvider::versioned_tracer( + let tracer = opentelemetry::trace::TracerProvider::versioned_tracer( &provider, "opentelemetry-zipkin", Some(env!("CARGO_PKG_VERSION")), @@ -193,7 +193,7 @@ impl ZipkinPipelineBuilder { let mut provider_builder = TracerProvider::builder().with_batch_exporter(exporter, runtime); provider_builder = provider_builder.with_config(config); let provider = provider_builder.build(); - let tracer = opentelemetry_api::trace::TracerProvider::versioned_tracer( + let tracer = opentelemetry::trace::TracerProvider::versioned_tracer( &provider, "opentelemetry-zipkin", Some(env!("CARGO_PKG_VERSION")), diff --git a/opentelemetry-zipkin/src/exporter/model/annotation.rs b/opentelemetry-zipkin/src/exporter/model/annotation.rs index 357c931c6f..32b49c0e7d 100644 --- a/opentelemetry-zipkin/src/exporter/model/annotation.rs +++ b/opentelemetry-zipkin/src/exporter/model/annotation.rs @@ -1,4 +1,4 @@ -use opentelemetry_api::trace::Event; +use opentelemetry::trace::Event; use serde::Serialize; use std::time::{Duration, SystemTime}; diff --git a/opentelemetry-zipkin/src/exporter/model/mod.rs b/opentelemetry-zipkin/src/exporter/model/mod.rs index 4a46083a0a..da1b0f6183 100644 --- a/opentelemetry-zipkin/src/exporter/model/mod.rs +++ b/opentelemetry-zipkin/src/exporter/model/mod.rs @@ -1,4 +1,4 @@ -use opentelemetry_api::{ +use opentelemetry::{ trace::{SpanKind, Status}, Key, KeyValue, }; diff --git a/opentelemetry-zipkin/src/exporter/model/span.rs b/opentelemetry-zipkin/src/exporter/model/span.rs index 1c8bf91ac7..d1423811ad 100644 --- a/opentelemetry-zipkin/src/exporter/model/span.rs +++ b/opentelemetry-zipkin/src/exporter/model/span.rs @@ -59,7 +59,7 @@ mod tests { use crate::exporter::model::endpoint::Endpoint; use crate::exporter::model::span::{Kind, Span}; use crate::exporter::model::{into_zipkin_span, OTEL_ERROR_DESCRIPTION, OTEL_STATUS_CODE}; - use opentelemetry_api::trace::{SpanContext, SpanId, SpanKind, Status, TraceFlags, TraceId}; + use opentelemetry::trace::{SpanContext, SpanId, SpanKind, Status, TraceFlags, TraceId}; use opentelemetry_sdk::{ export::trace::SpanData, trace::{EvictedHashMap, EvictedQueue}, diff --git a/opentelemetry-zipkin/src/lib.rs b/opentelemetry-zipkin/src/lib.rs index b84d7f377e..84e2f04862 100644 --- a/opentelemetry-zipkin/src/lib.rs +++ b/opentelemetry-zipkin/src/lib.rs @@ -87,10 +87,9 @@ //! //! //! ```no_run -//! use opentelemetry::{KeyValue, trace::Tracer}; +//! use opentelemetry::{global, KeyValue, trace::Tracer}; //! use opentelemetry_sdk::{trace::{self, RandomIdGenerator, Sampler}, Resource}; //! use opentelemetry_sdk::export::trace::ExportResult; -//! use opentelemetry::global; //! use opentelemetry_http::{HttpClient, HttpError}; //! use async_trait::async_trait; //! use bytes::Bytes; diff --git a/opentelemetry-zipkin/src/propagator/mod.rs b/opentelemetry-zipkin/src/propagator/mod.rs index 8a087f96a0..9f4d1ecb32 100644 --- a/opentelemetry-zipkin/src/propagator/mod.rs +++ b/opentelemetry-zipkin/src/propagator/mod.rs @@ -14,7 +14,7 @@ //! If `inject_encoding` is set to `B3Encoding::SingleHeader` then `b3` header is used to inject //! and extract. Otherwise, separate headers are used to inject and extract. use once_cell::sync::Lazy; -use opentelemetry_api::{ +use opentelemetry::{ propagation::{text_map_propagator::FieldIter, Extractor, Injector, TextMapPropagator}, trace::{SpanContext, SpanId, TraceContextExt, TraceFlags, TraceId, TraceState}, Context, @@ -316,7 +316,7 @@ impl TextMapPropagator for Propagator { #[cfg(test)] mod tests { use super::*; - use opentelemetry_api::{ + use opentelemetry::{ propagation::TextMapPropagator, testing::trace::TestSpan, trace::{SpanContext, SpanId, TraceFlags, TraceId}, diff --git a/opentelemetry-zpages/Cargo.toml b/opentelemetry-zpages/Cargo.toml index 19b993ab44..431f928a75 100644 --- a/opentelemetry-zpages/Cargo.toml +++ b/opentelemetry-zpages/Cargo.toml @@ -31,6 +31,7 @@ serde_json = "1.0" [dev-dependencies] tokio = { version = "1.0", features = ["macros", "rt"] } +opentelemetry = { path = "../opentelemetry", features = ["trace"]} opentelemetry_sdk = { path = "../opentelemetry-sdk", features = ["trace", "testing"] } rand = "0.8" hyper = { version = "0.14", features = ["full"] } diff --git a/opentelemetry-zpages/src/lib.rs b/opentelemetry-zpages/src/lib.rs index 03022239f3..7842c10d98 100644 --- a/opentelemetry-zpages/src/lib.rs +++ b/opentelemetry-zpages/src/lib.rs @@ -16,12 +16,13 @@ //! //! ```no_run //! # use opentelemetry_zpages::tracez; -//! # use opentelemetry::{global, runtime::Tokio, sdk::trace, trace::Tracer}; +//! # use opentelemetry::{global, trace::Tracer}; +//! # use opentelemetry_sdk::{runtime::Tokio, trace::TracerProvider}; //! # use std::sync::Arc; //! //! # fn main() { //! let (processor, querier) = tracez(5, Tokio); -//! let provider = trace::TracerProvider::builder() +//! let provider = TracerProvider::builder() //! .with_span_processor(processor) //! .build(); //! global::set_tracer_provider(provider); @@ -37,7 +38,7 @@ //! //! //! [`ZPagesSpanProcessor`]: trace::span_processor::ZPagesSpanProcessor -//! [`TracerProvider`]: opentelemetry::trace::TracerProvider +//! [`TracerProvider`]: opentelemetry_sdk::trace::TracerProvider //! [here]: https://github.com/open-telemetry/opentelemetry-rust/tree/main/examples/zpages #![warn( future_incompatible, diff --git a/opentelemetry-zpages/src/trace/mod.rs b/opentelemetry-zpages/src/trace/mod.rs index d5f9c74367..90ff37c013 100644 --- a/opentelemetry-zpages/src/trace/mod.rs +++ b/opentelemetry-zpages/src/trace/mod.rs @@ -20,16 +20,17 @@ pub(crate) mod span_queue; /// The `sample_size` config how may spans to sample for each unique span name. /// /// [`ZPagesSpanProcessor`]: span_processor::ZPagesSpanProcessor -/// [`TracerProvider`]: opentelemetry::trace::TracerProvider +/// [`TracerProvider`]: opentelemetry_sdk::trace::TracerProvider /// /// ## Example /// ```no_run /// # use opentelemetry_zpages::tracez; -/// # use opentelemetry::{global, runtime::Tokio, sdk::trace, trace::Tracer}; +/// # use opentelemetry::{global, trace::Tracer}; +/// # use opentelemetry_sdk::{runtime::Tokio, trace::TracerProvider}; /// # use std::sync::Arc; /// # fn main() { /// let (processor, querier) = tracez(5, Tokio); // sample 5 spans for each unique span name -/// let provider = trace::TracerProvider::builder() +/// let provider = TracerProvider::builder() /// .with_span_processor(processor) /// .build(); /// global::set_tracer_provider(provider);