File tree Expand file tree Collapse file tree
opentelemetry-otlp/src/exporter/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -771,7 +771,7 @@ impl HasHttpConfig for HttpExporterBuilder {
771771/// ```
772772pub trait WithHttpConfig {
773773 /// Assign client implementation
774- fn with_http_client < T : HttpClient + ' static > ( self , client : T ) -> Self ;
774+ fn with_http_client ( self , client : impl Into < std :: sync :: Arc < dyn HttpClient > > ) -> Self ;
775775
776776 /// Set additional headers to send to the collector.
777777 fn with_headers ( self , headers : HashMap < String , String > ) -> Self ;
@@ -785,8 +785,8 @@ pub trait WithHttpConfig {
785785}
786786
787787impl < B : HasHttpConfig > WithHttpConfig for B {
788- fn with_http_client < T : HttpClient + ' static > ( mut self , client : T ) -> Self {
789- self . http_client_config ( ) . client = Some ( Arc :: new ( client) ) ;
788+ fn with_http_client ( mut self , client : impl Into < std :: sync :: Arc < dyn HttpClient > > ) -> Self {
789+ self . http_client_config ( ) . client = Some ( client. into ( ) ) ;
790790 self
791791 }
792792
You can’t perform that action at this time.
0 commit comments