@@ -286,7 +286,7 @@ impl TraceExporter {
286
286
stats_concentrator. clone ( ) ,
287
287
self . metadata . clone ( ) ,
288
288
self . endpoint
289
- . try_to_path ( STATS_ENDPOINT )
289
+ . try_clone_with_subpath ( STATS_ENDPOINT )
290
290
. context ( "failed to create Endpoint" ) ?,
291
291
cancellation_token. clone ( ) ,
292
292
) ;
@@ -399,7 +399,7 @@ impl TraceExporter {
399
399
data,
400
400
trace_count,
401
401
self . endpoint
402
- . try_to_path ( self . output_format . as_path ( ) )
402
+ . try_clone_with_subpath ( self . output_format . as_path ( ) )
403
403
. map_err ( |e| {
404
404
TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) )
405
405
} ) ?,
@@ -617,7 +617,7 @@ impl TraceExporter {
617
617
let chunks = payload. size ( ) ;
618
618
let endpoint = self
619
619
. endpoint
620
- . try_to_path ( self . output_format . as_path ( ) )
620
+ . try_clone_with_subpath ( self . output_format . as_path ( ) )
621
621
. map_err ( |e| {
622
622
TraceExporterError :: Builder ( BuilderErrorKind :: InvalidUri ( e. to_string ( ) ) )
623
623
} ) ?;
@@ -939,9 +939,11 @@ impl TraceExporterBuilder {
939
939
let mut stats = StatsComputationStatus :: Disabled ;
940
940
941
941
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
+ } ) ?,
945
947
Duration :: from_secs ( 5 * 60 ) ,
946
948
) ;
947
949
@@ -1076,7 +1078,7 @@ mod tests {
1076
1078
assert_eq ! (
1077
1079
exporter
1078
1080
. endpoint
1079
- . try_to_path ( exporter. output_format. as_path( ) )
1081
+ . try_clone_with_subpath ( exporter. output_format. as_path( ) )
1080
1082
. unwrap( )
1081
1083
. url
1082
1084
. to_string( ) ,
@@ -1102,7 +1104,7 @@ mod tests {
1102
1104
assert_eq ! (
1103
1105
exporter
1104
1106
. endpoint
1105
- . try_to_path ( exporter. output_format. as_path( ) )
1107
+ . try_clone_with_subpath ( exporter. output_format. as_path( ) )
1106
1108
. unwrap( )
1107
1109
. url
1108
1110
. to_string( ) ,
0 commit comments