Skip to content

Commit c0a3cd1

Browse files
authored
release fixes: identifier to key in metrics, missing config block (#60)
1 parent 636e7aa commit c0a3cd1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

integration-tests/agent_conf.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
key_store.root_path = "keystore"
33
oracle.poll_interval_duration = "1s"
44
exporter.transaction_monitor.poll_interval_duration = "1s"
5+
6+
[metrics_server]
7+
bind_address="0.0.0.0:8888"

src/agent/metrics.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,23 +411,25 @@ impl PriceLocalMetrics {
411411
update_count,
412412
} = self;
413413

414+
let price_key = Pubkey::new(price_id.to_bytes().as_slice());
415+
414416
price
415417
.get_or_create(&PriceLocalLabels {
416-
pubkey: price_id.to_string(),
418+
pubkey: price_key.to_string(),
417419
})
418420
.set(price_info.price);
419421
conf.get_or_create(&PriceLocalLabels {
420-
pubkey: price_id.to_string(),
422+
pubkey: price_key.to_string(),
421423
})
422424
.set(price_info.conf as f64);
423425
timestamp
424426
.get_or_create(&PriceLocalLabels {
425-
pubkey: price_id.to_string(),
427+
pubkey: price_key.to_string(),
426428
})
427429
.set(price_info.timestamp);
428430
update_count
429431
.get_or_create(&PriceLocalLabels {
430-
pubkey: price_id.to_string(),
432+
pubkey: price_key.to_string(),
431433
})
432434
.inc();
433435
}

0 commit comments

Comments
 (0)