Add ccmc-{begin,end} markers

These markers are sent out at the beginning and end of a collection run.
This can be used to reconstruct, which metrics belong together and were
obtained during the same tick.
This commit is contained in:
Michael Panzlaff
2026-07-15 15:35:30 +02:00
parent b8e76e3bf0
commit cdac3c9163
+2
View File
@@ -148,6 +148,7 @@ func (cm *collectorManager) Start() {
done()
return
case t := <-tick:
lp.NewMetric("ccmc-begin", map[string]string{"type": "node"}, nil, map[string]interface{}{"value": 0}, time.Now())
cm.parallel_run = true
for _, c := range cm.collectors {
// Wait for done signal or execute the collector
@@ -179,6 +180,7 @@ func (cm *collectorManager) Start() {
c.Read(cm.duration, cm.output)
}
}
lp.NewMetric("ccmc-end", map[string]string{"type": "node"}, nil, map[string]interface{}{"value": 0}, time.Now())
}
}
})