@@ -4,7 +4,9 @@ use super::{
44} ;
55use crate :: { ExportConfig , Protocol , OTEL_EXPORTER_OTLP_ENDPOINT , OTEL_EXPORTER_OTLP_HEADERS } ;
66use http:: { HeaderName , HeaderValue , Uri } ;
7+ use opentelemetry:: env;
78use opentelemetry:: otel_debug;
9+ use opentelemetry:: time:: Duration ;
810use opentelemetry_http:: HttpClient ;
911use opentelemetry_proto:: transform:: common:: tonic:: ResourceAttributesWithSchema ;
1012#[ cfg( feature = "logs" ) ]
@@ -17,10 +19,8 @@ use opentelemetry_sdk::logs::LogBatch;
1719use opentelemetry_sdk:: trace:: SpanData ;
1820use prost:: Message ;
1921use std:: collections:: HashMap ;
20- use std:: env;
2122use std:: str:: FromStr ;
2223use std:: sync:: { Arc , Mutex } ;
23- use std:: time:: Duration ;
2424
2525#[ cfg( feature = "metrics" ) ]
2626mod metrics;
@@ -859,7 +859,7 @@ mod tests {
859859 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
860860 std:: collections:: HashMap :: new ( ) ,
861861 crate :: Protocol :: HttpBinary ,
862- std :: time:: Duration :: from_secs ( 10 ) ,
862+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
863863 Some ( crate :: Compression :: Gzip ) ,
864864 ) ;
865865
@@ -890,7 +890,7 @@ mod tests {
890890 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
891891 std:: collections:: HashMap :: new ( ) ,
892892 crate :: Protocol :: HttpBinary ,
893- std :: time:: Duration :: from_secs ( 10 ) ,
893+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
894894 Some ( crate :: Compression :: Zstd ) ,
895895 ) ;
896896
@@ -918,7 +918,7 @@ mod tests {
918918 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
919919 std:: collections:: HashMap :: new ( ) ,
920920 crate :: Protocol :: HttpBinary ,
921- std :: time:: Duration :: from_secs ( 10 ) ,
921+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
922922 None , // No compression
923923 ) ;
924924
@@ -939,7 +939,7 @@ mod tests {
939939 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
940940 std:: collections:: HashMap :: new ( ) ,
941941 crate :: Protocol :: HttpBinary ,
942- std :: time:: Duration :: from_secs ( 10 ) ,
942+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
943943 Some ( crate :: Compression :: Gzip ) ,
944944 ) ;
945945
@@ -961,7 +961,7 @@ mod tests {
961961 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
962962 std:: collections:: HashMap :: new ( ) ,
963963 crate :: Protocol :: HttpBinary ,
964- std :: time:: Duration :: from_secs ( 10 ) ,
964+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
965965 Some ( crate :: Compression :: Zstd ) ,
966966 ) ;
967967
@@ -1023,19 +1023,19 @@ mod tests {
10231023 "http://localhost:4318" . parse ( ) . unwrap ( ) ,
10241024 HashMap :: new ( ) ,
10251025 protocol,
1026- std :: time:: Duration :: from_secs ( 10 ) ,
1026+ opentelemetry :: time:: Duration :: from_secs ( 10 ) ,
10271027 compression,
10281028 )
10291029 }
10301030
10311031 fn create_test_span_data ( ) -> opentelemetry_sdk:: trace:: SpanData {
1032+ use opentelemetry:: time:: { Duration , SystemTime } ;
10321033 use opentelemetry:: trace:: Status ;
10331034 use opentelemetry:: trace:: {
10341035 SpanContext , SpanId , SpanKind , TraceFlags , TraceId , TraceState ,
10351036 } ;
10361037 use opentelemetry_sdk:: trace:: { SpanData , SpanEvents , SpanLinks } ;
10371038 use std:: borrow:: Cow ;
1038- use std:: time:: { Duration , SystemTime } ;
10391039
10401040 let span_context = SpanContext :: new (
10411041 TraceId :: from ( 123 ) ,
0 commit comments