Fix Prometheus: event counters are exported with incorrect metric names

This commit is contained in:
Maurus Decimus
2026-06-28 18:53:45 +02:00
parent 8d229d6c9b
commit 7e7e254328
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ use std::sync::atomic::Ordering;
use atomics::{array::AtomicU32Array, gauge::AtomicGauge, histogram::AtomicHistogram};
use ipc::{
collector::{Collector, EVENT_TYPES, GlobalInterests},
collector::{Collector, GlobalInterests},
subscriber::Interests,
};
@@ -216,7 +216,7 @@ impl Collector {
let value = value.load(Ordering::Relaxed);
if value > 0 {
Some(EventCounter {
id: EVENT_TYPES[event_id],
id: EventType::from_id(event_id as u16)?,
value,
})
} else {