1414
1515use std:: { collections:: HashMap , time:: Duration } ;
1616
17- use opentelemetry:: { trace:: TracerProvider , InstrumentationScope } ;
1817use opentelemetry_otlp:: { WithExportConfig , WithTonicConfig } ;
1918use opentelemetry_sdk:: {
2019 trace:: { Sampler , SpanLimits } ,
2120 Resource ,
2221} ;
2322use pyo3:: prelude:: * ;
23+ use qcs_dependencies_client:: opentelemetry:: { trace:: TracerProvider , InstrumentationScope } ;
2424use tracing_subscriber:: Layer ;
2525
2626use crate :: create_init_submodule;
27- use tonic:: metadata:: {
27+ use qcs_dependencies_client :: tonic:: metadata:: {
2828 errors:: { InvalidMetadataKey , InvalidMetadataValue } ,
2929 MetadataKey ,
3030} ;
@@ -41,13 +41,13 @@ pub(crate) struct Config {
4141 /// OpenTelemetry resource attributes describing the entity that produced the telemetry.
4242 resource : Resource ,
4343 /// The metadata map to use for requests to the remote collector.
44- metadata_map : Option < tonic:: metadata:: MetadataMap > ,
44+ metadata_map : Option < qcs_dependencies_client :: tonic:: metadata:: MetadataMap > ,
4545 /// The sampler to use for the [`opentelemetry_sdk::trace::SdkTracerProvider`].
4646 sampler : Sampler ,
4747 /// The endpoint to which the exporter will send trace data. If not set, this must be set by
4848 /// OTLP environment variables.
4949 endpoint : Option < String > ,
50- /// Timeout applied the [`tonic::transport::Channel`] used to send trace data to the remote collector.
50+ /// Timeout applied the [`qcs_dependencies_client:: tonic::transport::Channel`] used to send trace data to the remote collector.
5151 timeout : Option < Duration > ,
5252 /// A timeout applied to the shutdown of the [`crate::contextmanager::Tracing`] context
5353 /// manager upon exiting, before the underlying [`opentelemetry_sdk::trace::SdkTracerProvider`]
@@ -110,7 +110,7 @@ impl Config {
110110 |instrumentation_library| provider. tracer_with_scope ( instrumentation_library. clone ( ) ) ,
111111 ) ;
112112
113- let layer = tracing_opentelemetry:: layer ( )
113+ let layer = qcs_dependencies_client :: tracing_opentelemetry:: layer ( )
114114 . with_tracer ( tracer)
115115 . with_filter ( env_filter) ;
116116 Ok ( WithShutdown {
@@ -303,7 +303,7 @@ impl From<PyResource> for Resource {
303303 let kvs = resource
304304 . attrs
305305 . into_iter ( )
306- . map ( |( k, v) | opentelemetry:: KeyValue :: new ( k, v) ) ;
306+ . map ( |( k, v) | qcs_dependencies_client :: opentelemetry:: KeyValue :: new ( k, v) ) ;
307307
308308 if let Some ( schema_url) = resource. schema_url {
309309 Self :: builder ( ) . with_schema_url ( kvs, schema_url)
@@ -340,7 +340,7 @@ pub(crate) enum PyResourceValueArray {
340340 String ( Vec < String > ) ,
341341}
342342
343- impl From < PyResourceValueArray > for opentelemetry:: Array {
343+ impl From < PyResourceValueArray > for qcs_dependencies_client :: opentelemetry:: Array {
344344 fn from ( py_resource_value_array : PyResourceValueArray ) -> Self {
345345 match py_resource_value_array {
346346 PyResourceValueArray :: Bool ( b) => Self :: Bool ( b) ,
@@ -353,7 +353,7 @@ impl From<PyResourceValueArray> for opentelemetry::Array {
353353 }
354354}
355355
356- impl From < PyResourceValue > for opentelemetry:: Value {
356+ impl From < PyResourceValue > for qcs_dependencies_client :: opentelemetry:: Value {
357357 fn from ( py_resource_value : PyResourceValue ) -> Self {
358358 match py_resource_value {
359359 PyResourceValue :: Bool ( b) => Self :: Bool ( b) ,
@@ -393,7 +393,8 @@ impl From<PySampler> for Sampler {
393393const OTEL_EXPORTER_OTLP_HEADERS : & str = "OTEL_EXPORTER_OTLP_HEADERS" ;
394394const OTEL_EXPORTER_OTLP_TRACES_HEADERS : & str = "OTEL_EXPORTER_OTLP_TRACES_HEADERS" ;
395395
396- fn get_metadata_from_environment ( ) -> Result < tonic:: metadata:: MetadataMap , ConfigError > {
396+ fn get_metadata_from_environment (
397+ ) -> Result < qcs_dependencies_client:: tonic:: metadata:: MetadataMap , ConfigError > {
397398 [
398399 OTEL_EXPORTER_OTLP_HEADERS ,
399400 OTEL_EXPORTER_OTLP_TRACES_HEADERS ,
@@ -411,7 +412,7 @@ fn get_metadata_from_environment() -> Result<tonic::metadata::MetadataMap, Confi
411412 . collect :: < Vec < ( String , String ) > > ( )
412413 } )
413414 . try_fold (
414- tonic:: metadata:: MetadataMap :: new ( ) ,
415+ qcs_dependencies_client :: tonic:: metadata:: MetadataMap :: new ( ) ,
415416 |mut metadata, ( k, v) | {
416417 let key = k. parse :: < MetadataKey < _ > > ( ) . map_err ( ConfigError :: from) ?;
417418 metadata. insert ( key, v. parse ( ) . map_err ( ConfigError :: from) ?) ;
@@ -428,7 +429,7 @@ impl TryFrom<PyConfig> for Config {
428429 let metadata_map = match config. metadata_map {
429430 Some ( m) => Some ( m. into_iter ( ) . try_fold (
430431 env_metadata_map,
431- |mut metadata_map : tonic:: metadata:: MetadataMap ,
432+ |mut metadata_map : qcs_dependencies_client :: tonic:: metadata:: MetadataMap ,
432433 ( k, v) |
433434 -> Result < _ , Self :: Error > {
434435 let key = k. parse :: < MetadataKey < _ > > ( ) . map_err ( ConfigError :: from) ?;
0 commit comments