[chore] Change job_id in metric to source_type (#5149)

job_id has high cardinality, exploding the metrics we collect.
source_type better aligns with our other metrics (along with
source_name).
This commit is contained in:
Miccah
2026-07-22 14:13:45 -07:00
committed by GitHub
parent e74404a774
commit a2ef4f51a5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1183,7 +1183,7 @@ func (e *Engine) detectChunk(ctx context.Context, data detectableChunk) {
detectorExecutionCount.WithLabelValues(
detectorNameStr,
strconv.Itoa(int(data.chunk.JobID)),
sourceTypeStr,
data.chunk.SourceName,
).Inc()
detectorExecutionDuration.WithLabelValues(
+1 -1
View File
@@ -16,7 +16,7 @@ var (
Name: "detector_execution_count",
Help: "Total number of times a detector has been executed.",
},
[]string{"detector_name", "job_id", "source_name"},
[]string{"detector_name", "source_type", "source_name"},
)
// Note this is the time taken to call FromData on each detector, not necessarily the time taken