Skip to content

Commit a94855e

Browse files
committed
tweak docs
1 parent 445abd6 commit a94855e

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
The `tag_cardinality_limit` transform gained two new top-level settings:
22

33
- **`tracking_scope`** controls how tag tracking state is partitioned across metrics:
4-
- `global` (default — preserves existing behavior): all metrics share a single
5-
tracking bucket, and the global `value_limit` caps the combined set of tag values
6-
across them.
4+
- `global` (default — preserves existing behavior): all tags share a single
5+
tracking bucket across metrics, and the global `value_limit` caps this combined
6+
set of tag values them.
77
- `per_metric`: every distinct metric gets its own tracking bucket, providing tag
88
cardinality limiting for each metric in isolation at the cost of higher memory.
99

1010
- **`max_tracked_keys`** caps the total number of distinct (metric, tag-key) pairs
1111
tracked across the entire transform. When the cap is reached, additional pairs are
12-
not allocated and tag values for those pairs pass through unchecked (they are
13-
*not* dropped). Operators can detect this via the new
14-
`tag_cardinality_untracked_events_total` counter (incremented once per event with at
15-
least one untracked tag) and the `tag_cardinality_tracked_keys` gauge (current size
16-
of the cardinality cache). Defaults to unlimited, preserving existing behavior.
12+
are not tracked and tag values for those pairs pass through unchecked.
13+
- Users can detect this via the new
14+
`tag_cardinality_untracked_events_total` counter (incremented once per event with at
15+
least one untracked tag) and the `tag_cardinality_tracked_keys` gauge (current size
16+
of the cardinality cache). Defaults to unlimited, preserving existing behavior.
17+
- When using `max_tracked_key` with global tracking scope, the specified cap
18+
will still apply (e.g. tags will be tracked as (<null>, tag-key))
1719

1820
authors: ArunPiduguDD

src/transforms/tag_cardinality_limit/config.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ pub struct Config {
4343
/// Maximum number of distinct (metric, tag-key) pairs to track across the entire
4444
/// transform. When this cap is reached, additional tag keys on new metrics or new
4545
/// tag keys on existing metrics are not tracked, and tag values for those pairs
46-
/// pass through unchecked. Operators can detect this via the
46+
/// pass through unchecked. users can detect this via the
4747
/// `tag_cardinality_untracked_events_total` counter and the
4848
/// `tag_cardinality_tracked_keys` gauge.
49-
///
49+
5050
/// When unset (default), there is no cap and the transform tracks all pairs it
51-
/// encounters.
51+
/// encounters. In `global` tracking scope mode, this limit still applies (the
52+
/// metric key is set to `None` unless there is a per-metric override)
5253
#[configurable(derived)]
5354
#[serde(default)]
5455
pub max_tracked_keys: Option<usize>,
@@ -68,8 +69,8 @@ pub struct Config {
6869
#[serde(rename_all = "snake_case")]
6970
pub enum TrackingScope {
7071
/// All metrics share a single tracking bucket. Tag values pool across metrics,
71-
/// and the global `value_limit` caps the combined set. Lower memory but
72-
/// cross-metric pollution.
72+
/// and the global `value_limit` caps the combined set. Lower memory requirements
73+
/// but cardinality per metric is not tracked unless a per-metric override is configured.
7374
#[default]
7475
Global,
7576

website/cue/reference/components/transforms/generated/tag_cardinality_limit.cue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ generated: components: transforms: tag_cardinality_limit: configuration: {
4545
Maximum number of distinct (metric, tag-key) pairs to track across the entire
4646
transform. When this cap is reached, additional tag keys on new metrics or new
4747
tag keys on existing metrics are not tracked, and tag values for those pairs
48-
pass through unchecked. Operators can detect this via the
48+
pass through unchecked. users can detect this via the
4949
`tag_cardinality_untracked_events_total` counter and the
5050
`tag_cardinality_tracked_keys` gauge.
51-
5251
When unset (default), there is no cap and the transform tracks all pairs it
53-
encounters.
52+
encounters. In `global` tracking scope mode, this limit still applies (the
53+
metric key is set to `None` unless there is a per-metric override)
5454
"""
5555
required: false
5656
type: uint: {}
@@ -162,8 +162,8 @@ generated: components: transforms: tag_cardinality_limit: configuration: {
162162
enum: {
163163
global: """
164164
All metrics share a single tracking bucket. Tag values pool across metrics,
165-
and the global `value_limit` caps the combined set. Lower memory but
166-
cross-metric pollution.
165+
and the global `value_limit` caps the combined set. Lower memory requirements
166+
but cardinality per metric is not tracked unless a per-metric override is configured.
167167
"""
168168
per_metric: """
169169
Every distinct metric gets its own tracking bucket, providing tag

0 commit comments

Comments
 (0)