File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ key_store.mapping_key = "RelevantOracleMappingAddress"
199199[opentelemetry ]
200200
201201# Timeout in seconds for the OpenTelemetry exporter
202- exporter_timeout_secs = 3
202+ exporter_timeout_duration = " 3s "
203203
204204# Endpoint URL for the OpenTelemetry exporter
205205exporter_endpoint = " http://127.0.0.1:4317"
Original file line number Diff line number Diff line change 1313 File ,
1414 } ,
1515 serde:: Deserialize ,
16- std:: path:: Path ,
16+ std:: {
17+ path:: Path ,
18+ time:: Duration ,
19+ } ,
1720} ;
1821
1922/// Configuration for all components of the Agent
@@ -88,6 +91,7 @@ impl Default for ChannelCapacities {
8891
8992#[ derive( Deserialize , Debug ) ]
9093pub struct OpenTelemetryConfig {
91- pub exporter_timeout_secs : u64 ,
92- pub exporter_endpoint : String ,
94+ #[ serde( with = "humantime_serde" ) ]
95+ pub exporter_timeout_duration : Duration ,
96+ pub exporter_endpoint : String ,
9397}
Original file line number Diff line number Diff line change 1414 std:: {
1515 io:: IsTerminal ,
1616 path:: PathBuf ,
17- time:: Duration ,
1817 } ,
1918 tracing_subscriber:: {
2019 prelude:: * ,
@@ -65,9 +64,7 @@ async fn main() -> Result<()> {
6564 let otlp_exporter = opentelemetry_otlp:: new_exporter ( )
6665 . tonic ( )
6766 . with_endpoint ( & opentelemetry_config. exporter_endpoint )
68- . with_timeout ( Duration :: from_secs (
69- opentelemetry_config. exporter_timeout_secs ,
70- ) ) ;
67+ . with_timeout ( opentelemetry_config. exporter_timeout_duration ) ;
7168
7269 // Set up the OpenTelemetry tracer
7370 let tracer = opentelemetry_otlp:: new_pipeline ( )
You can’t perform that action at this time.
0 commit comments