@@ -286,7 +286,7 @@ impl TraceExporter {
286286                stats_concentrator. clone ( ) , 
287287                self . metadata . clone ( ) , 
288288                self . endpoint 
289-                     . try_to_path ( STATS_ENDPOINT ) 
289+                     . try_clone_with_subpath ( STATS_ENDPOINT ) 
290290                    . context ( "failed to create Endpoint" ) ?, 
291291                cancellation_token. clone ( ) , 
292292            ) ; 
@@ -399,7 +399,7 @@ impl TraceExporter {
399399            data, 
400400            trace_count, 
401401            self . endpoint 
402-                 . try_to_path ( self . output_format . as_path ( ) ) 
402+                 . try_clone_with_subpath ( self . output_format . as_path ( ) ) 
403403                . map_err ( |e| { 
404404                    TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) ) 
405405                } ) ?, 
@@ -617,7 +617,7 @@ impl TraceExporter {
617617        let  chunks = payload. size ( ) ; 
618618        let  endpoint = self 
619619            . endpoint 
620-             . try_to_path ( self . output_format . as_path ( ) ) 
620+             . try_clone_with_subpath ( self . output_format . as_path ( ) ) 
621621            . map_err ( |e| { 
622622                TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) ) 
623623            } ) ?; 
@@ -939,9 +939,11 @@ impl TraceExporterBuilder {
939939        let  mut  stats = StatsComputationStatus :: Disabled ; 
940940
941941        let  info_fetcher = AgentInfoFetcher :: new ( 
942-             endpoint. try_to_path ( INFO_ENDPOINT ) . map_err ( |e| { 
943-                 TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) ) 
944-             } ) ?, 
942+             endpoint
943+                 . try_clone_with_subpath ( INFO_ENDPOINT ) 
944+                 . map_err ( |e| { 
945+                     TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) ) 
946+                 } ) ?, 
945947            Duration :: from_secs ( 5  *  60 ) , 
946948        ) ; 
947949
@@ -1076,7 +1078,7 @@ mod tests {
10761078        assert_eq ! ( 
10771079            exporter
10781080                . endpoint
1079-                 . try_to_path ( exporter. output_format. as_path( ) ) 
1081+                 . try_clone_with_subpath ( exporter. output_format. as_path( ) ) 
10801082                . unwrap( ) 
10811083                . url
10821084                . to_string( ) , 
@@ -1102,7 +1104,7 @@ mod tests {
11021104        assert_eq ! ( 
11031105            exporter
11041106                . endpoint
1105-                 . try_to_path ( exporter. output_format. as_path( ) ) 
1107+                 . try_clone_with_subpath ( exporter. output_format. as_path( ) ) 
11061108                . unwrap( ) 
11071109                . url
11081110                . to_string( ) , 
0 commit comments