File tree Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,3 @@ exporter.maximum_compute_unit_price_micro_lamports = 100000
70
70
# Note that this doesn't affect the rate at which transactions are published:
71
71
# this is soley a backwards-compatibility API feature.
72
72
notify_price_sched_interval_duration = " 400ms"
73
-
74
- # Configuration for OpenTelemetry
75
- [opentelemetry ]
76
-
77
- # Timeout in seconds for the OpenTelemetry exporter
78
- exporter_timeout_secs = 3
79
-
80
- # Endpoint URL for the OpenTelemetry exporter
81
- exporter_endpoint = " http://127.0.0.1:4317"
Original file line number Diff line number Diff line change @@ -60,12 +60,3 @@ exporter.compute_unit_price_micro_lamports = 1000
60
60
# Note that this doesn't affect the rate at which transactions are published:
61
61
# this is soley a backwards-compatibility API feature.
62
62
notify_price_sched_interval_duration = " 400ms"
63
-
64
- # Configuration for OpenTelemetry
65
- [opentelemetry ]
66
-
67
- # Timeout in seconds for the OpenTelemetry exporter
68
- exporter_timeout_secs = 3
69
-
70
- # Endpoint URL for the OpenTelemetry exporter
71
- exporter_endpoint = " http://127.0.0.1:4317"
Original file line number Diff line number Diff line change 16
16
path:: PathBuf ,
17
17
time:: Duration ,
18
18
} ,
19
- tracing_subscriber:: prelude:: * ,
19
+ tracing_subscriber:: {
20
+ prelude:: * ,
21
+ EnvFilter ,
22
+ } ,
20
23
} ;
21
24
22
25
#[ derive( Parser , Debug ) ]
@@ -45,6 +48,8 @@ async fn main() -> Result<()> {
45
48
// Parse config early for logging channel capacity
46
49
let config = Config :: new ( args. config ) . context ( "Could not parse config" ) ?;
47
50
51
+ let env_filter = EnvFilter :: from_default_env ( ) ;
52
+
48
53
// Initialize a Tracing Subscriber
49
54
let fmt_layer = tracing_subscriber:: fmt:: layer ( )
50
55
. with_file ( false )
@@ -73,7 +78,9 @@ async fn main() -> Result<()> {
73
78
// Set up the telemetry layer
74
79
let telemetry = tracing_opentelemetry:: layer ( ) . with_tracer ( tracer) ;
75
80
76
- let registry = tracing_subscriber:: registry ( ) . with ( telemetry) ;
81
+ let registry = tracing_subscriber:: registry ( )
82
+ . with ( telemetry)
83
+ . with ( env_filter) ;
77
84
78
85
// Use the compact formatter if we're in a terminal, otherwise use the JSON formatter.
79
86
if std:: io:: stderr ( ) . is_terminal ( ) {
You can’t perform that action at this time.
0 commit comments