[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:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user