Monitoring: metric history, one edition of metrics, and x:Metric over the stored samples (MON-4 to MON-7, MON-9, MON-17, MON-39)

Every node writes a sample per metric on metricsCollectionInterval:
counters as the increase since its last sample, gauges always, histograms
as totals when changed. Samples are x:Metric in the registry's encoding
under the telemetry key class, ids time-ordered. x:Metric/get and /query
read them with metric and timestamp filters and full paging, hide what's
past holdMetricsFor, and the data purge deletes it. The is_enterprise
split is gone, so every gauge and histogram is collected and exported, and
queue.count is set from the queue itself. The shared metrics suite runs.
This commit is contained in:
2026-09-19 08:21:45 -07:00
parent 715f219528
commit 9f7035588f
18 changed files with 586 additions and 64 deletions
+3 -6
View File
@@ -17,14 +17,13 @@ use webhooks::spawn_webhook_tracer;
use crate::config::telemetry::{Telemetry, TelemetrySubscriberType};
impl Telemetry {
pub fn enable(self, is_enterprise: bool) {
pub fn enable(self) {
// Spawn tracers
for tracer in self.tracers.subscribers {
tracer.typ.spawn(
SubscriberBuilder::new(tracer.id)
.with_interests(tracer.interests)
.with_lossy(tracer.lossy),
is_enterprise,
);
}
@@ -35,7 +34,7 @@ impl Telemetry {
Collector::reload();
}
pub fn update(self, is_enterprise: bool) {
pub fn update(self) {
// Remove tracers that are no longer active
let active_subscribers = Collector::get_subscribers();
for subscribed_id in &active_subscribers {
@@ -58,7 +57,6 @@ impl Telemetry {
SubscriberBuilder::new(tracer.id)
.with_interests(tracer.interests)
.with_lossy(tracer.lossy),
is_enterprise,
);
}
}
@@ -96,8 +94,7 @@ impl Telemetry {
}
impl TelemetrySubscriberType {
// inbuxa: `_is_enterprise` is unused until monitoring history is rebuilt, and goes when it is: there is one edition
pub fn spawn(self, builder: SubscriberBuilder, _is_enterprise: bool) {
pub fn spawn(self, builder: SubscriberBuilder) {
match self {
TelemetrySubscriberType::ConsoleTracer(settings) => {
spawn_console_tracer(builder, settings)