Commit f3828fe
enhancement(tag_cardinality_limit transform): add exclude_tags option to bypass cardinality limiting (#25316)
* enhancement(tag_cardinality_limit transform): add top-level per_tag_limits
Adds a `per_tag_limits` map at the top level of the `tag_cardinality_limit`
config, reusing the `PerTagConfig` / `PerTagMode` types introduced in #25360
for the per-metric variant. Each entry uses the same `mode: limit_override`
(with a custom `value_limit`) or `mode: excluded` shape, applied to every
metric that does not match a `per_metric_limits` entry.
Per-metric overrides shadow the global per-tag map: a matched metric only
consults its own `per_tag_limits` (consistent with how the rest of the
transform resolves per-metric vs. global config).
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(tag_cardinality_limit transform): preserve untracked passthrough when value_limit is zero
`tag_limit_exceeded` previously returned `true` for any missing-bucket lookup when
`value_limit == 0`, which under `drop_event` caused events to be rejected before
`record_tag_value` could detect that `max_tracked_keys` was exhausted. New
(metric, tag-key) pairs that cannot be allocated must instead pass through
unchecked and emit `tag_cardinality_untracked_events_total`. Guard the
`value_limit == 0` rejection on `can_allocate_new_key()` so the untracked path
runs whenever the pair would not actually be tracked.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs(tag_cardinality_limit transform): explain global per_tag_limits with example
Address review feedback from @pront: the field doc comment was correct but
dense. Move the precedence rules and a worked YAML example into a new
"Per-tag overrides" section under "How it works", and trim the field
doc-comment to a one-line description that points at the new section.
Also fix CRLF → LF line endings in the changelog fragment caught by
`vdev check fmt`.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>1 parent 35c7d5a commit f3828fe
6 files changed
Lines changed: 472 additions & 6 deletions
File tree
- changelog.d
- src/transforms/tag_cardinality_limit
- website/cue/reference/components/transforms
- generated
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
| |||
311 | 324 | | |
312 | 325 | | |
313 | 326 | | |
| 327 | + | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
100 | | - | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | | - | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
143 | 163 | | |
144 | 164 | | |
145 | 165 | | |
| |||
237 | 257 | | |
238 | 258 | | |
239 | 259 | | |
240 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
241 | 264 | | |
242 | | - | |
| 265 | + | |
243 | 266 | | |
244 | 267 | | |
245 | 268 | | |
| |||
0 commit comments