File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ key_store.mapping_key = "RelevantOracleMappingAddress"
198
198
# # Configuration for OpenTelemetry ##
199
199
[opentelemetry ]
200
200
201
- # Timeout in seconds for the OpenTelemetry exporter
202
- exporter_timeout_secs = 3
201
+ # Timeout duration for the OpenTelemetry exporter
202
+ exporter_timeout_duration = " 3s "
203
203
204
204
# Endpoint URL for the OpenTelemetry exporter
205
205
exporter_endpoint = " http://127.0.0.1:4317"
Original file line number Diff line number Diff line change 13
13
File ,
14
14
} ,
15
15
serde:: Deserialize ,
16
- std:: path:: Path ,
16
+ std:: {
17
+ path:: Path ,
18
+ time:: Duration ,
19
+ } ,
17
20
} ;
18
21
19
22
/// Configuration for all components of the Agent
@@ -88,6 +91,7 @@ impl Default for ChannelCapacities {
88
91
89
92
#[ derive( Deserialize , Debug ) ]
90
93
pub 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 ,
93
97
}
Original file line number Diff line number Diff line change 14
14
std:: {
15
15
io:: IsTerminal ,
16
16
path:: PathBuf ,
17
- time:: Duration ,
18
17
} ,
19
18
tracing_subscriber:: {
20
19
prelude:: * ,
@@ -65,9 +64,7 @@ async fn main() -> Result<()> {
65
64
let otlp_exporter = opentelemetry_otlp:: new_exporter ( )
66
65
. tonic ( )
67
66
. 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 ) ;
71
68
72
69
// Set up the OpenTelemetry tracer
73
70
let tracer = opentelemetry_otlp:: new_pipeline ( )
You can’t perform that action at this time.
0 commit comments