File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
docker/compose/movement-full-node
networks/movement/movement-full-node/src Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,20 @@ services:
7
7
- DOT_MOVEMENT_PATH=/.movement
8
8
- MOVEMENT_TIMING=info
9
9
- RUST_BACKTRACE=1
10
+ - MOVEMENT_METRICS_ADDR=0.0.0.0:9464
11
+ - APTOS_FORCE_ENABLE_TELEMETRY=1
12
+ - APTOS_METRICS_PORT=9464
13
+ - APTOS_METRICS_HOST=0.0.0.0
14
+ - APTOS_DISABLE_TELEMETRY_PUSH_METRICS=1
15
+ - PROMETHEUS_METRICS_ENABLED=1
16
+ - APTOS_ENABLE_CONSENSUS_METRICS=1
17
+ - APTOS_ENABLE_DB_METRICS=1
18
+ - APTOS_ENABLE_MEMPOOL_METRICS=1
19
+ - APTOS_ENABLE_NETWORK_METRICS=1
20
+ - APTOS_ENABLE_STORAGE_METRICS=1
21
+ - APTOS_ENABLE_VM_METRICS=1
22
+ # OTEL Configuration (optional - uncomment and set your endpoint)
23
+ # - MOVEMENT_OTEL_ENDPOINT=http://otel-collector:4317
10
24
volumes :
11
25
- ${DOT_MOVEMENT_PATH}:/.movement
12
26
ports :
Original file line number Diff line number Diff line change 2
2
use clap:: * ;
3
3
use movement_full_node:: MovementFullNode ;
4
4
use tracing_subscriber:: EnvFilter ;
5
+
5
6
#[ tokio:: main]
6
7
async fn main ( ) -> Result < ( ) , anyhow:: Error > {
7
8
// Initialize default tracing
@@ -10,6 +11,12 @@ async fn main() -> Result<(), anyhow::Error> {
10
11
EnvFilter :: try_from_default_env ( ) . unwrap_or_else ( |_| EnvFilter :: new ( "info" ) ) ,
11
12
)
12
13
. init ( ) ;
14
+
15
+ // Initialize telemetry if MOVEMENT_METRICS_ADDR is set
16
+ if std:: env:: var ( "MOVEMENT_METRICS_ADDR" ) . is_ok ( ) {
17
+ movement_tracing:: ensure_telemetry_initialized ( ) ;
18
+ }
19
+
13
20
let suzuka_util = MovementFullNode :: parse ( ) ;
14
21
let result = suzuka_util. execute ( ) . await ;
15
22
result
Original file line number Diff line number Diff line change @@ -343,6 +343,12 @@ pub fn start_telemetry_service() {
343
343
std:: env:: set_var ( "APTOS_ENABLE_STORAGE_METRICS" , "1" ) ;
344
344
std:: env:: set_var ( "APTOS_ENABLE_VM_METRICS" , "1" ) ;
345
345
346
+ // Configure OTEL if endpoint is provided
347
+ if let Ok ( otel_endpoint) = std:: env:: var ( "MOVEMENT_OTEL_ENDPOINT" ) {
348
+ std:: env:: set_var ( "APTOS_OTEL_ENDPOINT" , & otel_endpoint) ;
349
+ info ! ( "Configured OTEL endpoint: {}" , otel_endpoint) ;
350
+ }
351
+
346
352
// Register custom metrics
347
353
register_custom_metrics ( ) ;
348
354
You can’t perform that action at this time.
0 commit comments