Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The `tag_value_limit_exceeded_total` metric now includes `metric_name` and `tag_key` labels to help identify which specific metrics and tag keys are hitting the configured value limit in the `tag_cardinality_limit` transform.

authors: kaarolch
14 changes: 12 additions & 2 deletions src/internal_events/tag_cardinality_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ impl InternalEvent for TagCardinalityLimitRejectingEvent<'_> {
tag_key = self.tag_key,
tag_value = self.tag_value,
);
counter!("tag_value_limit_exceeded_total").increment(1);
counter!(
"tag_value_limit_exceeded_total",
"metric_name" => self.metric_name.to_string(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look reasonable. We could have very high cardinality here though, I wonder if we need to gate this behind a config option.

Copy link
Contributor Author

@kaarolch kaarolch Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pront added additional configuration flag, and update run result in the PR description.

"tag_key" => self.tag_key.to_string(),
)
.increment(1);

emit!(ComponentEventsDropped::<INTENTIONAL> {
count: 1,
Expand All @@ -38,7 +43,12 @@ impl InternalEvent for TagCardinalityLimitRejectingTag<'_> {
tag_key = self.tag_key,
tag_value = self.tag_value,
);
counter!("tag_value_limit_exceeded_total").increment(1);
counter!(
"tag_value_limit_exceeded_total",
"metric_name" => self.metric_name.to_string(),
"tag_key" => self.tag_key.to_string(),
)
.increment(1);
}
}

Expand Down
11 changes: 10 additions & 1 deletion website/cue/reference/components/sources/internal_metrics.cue
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,16 @@ components: sources: internal_metrics: {
"""
type: "counter"
default_namespace: "vector"
tags: _component_tags
tags: _component_tags & {
metric_name: {
description: "The name of the metric for which the tag value limit was exceeded."
required: true
}
tag_key: {
description: "The key of the tag for which the value limit was exceeded."
required: true
}
}
}
timestamp_parse_errors_total: {
description: "The total number of errors encountered parsing [RFC 3339](\(urls.rfc_3339)) timestamps."
Expand Down
Loading