-
Notifications
You must be signed in to change notification settings - Fork 2.2k
enhancement(tag_cardinality_limit transform): add sliding-window TTL for tag values #25485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kaarolch
wants to merge
10
commits into
vectordotdev:master
Choose a base branch
from
kaarolch:tag_cardinality_cache_ttl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,285
−103
Open
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
13e40e4
enhancement(tag_cardinality_limit transform): add sliding-window TTL …
kaarolch 3c9a0bf
Fix tests
kaarolch 6395814
Add changelog.md
kaarolch 59e05f8
Fix formating
kaarolch 7aa7efb
Add missing const
kaarolch dde8896
Merge remote-tracking branch 'upstream/master' into tag_cardinality_c…
kaarolch b95265e
fix(tag_cardinality_limit transform): address Codex review on TTL imp…
kaarolch 528561d
fix(tag_cardinality_limit transform): tighten TTL comments, capacity …
kaarolch 57e3ce8
Merge branch 'master' into tag_cardinality_cache_ttl
kaarolch 44d9f07
fix(tag_cardinality_limit transform): fix TTL window math, expired re…
kaarolch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| The `tag_cardinality_limit` transform gained an optional sliding-window TTL | ||
| for tracked tag values, controlled by two new settings on the global block, | ||
| each `per_metric_limits` entry, and the `Inner`/`OverrideInner` config schemas: | ||
|
|
||
| - **`ttl_secs`**: expire tracked tag values after this many seconds since they | ||
| were last seen. Useful when the downstream system (e.g. Datadog custom | ||
| metrics) bills on a rolling unique-series window — without TTL, the | ||
| cardinality cache saturates `value_limit` and starts rejecting fresh values | ||
| long after the old ones have aged out of the billing window. When unset | ||
| (default), behavior is unchanged from previous releases. | ||
| - **`ttl_generations`**: tune how the TTL window is sliced for the | ||
| `probabilistic` backend. Defaults to `4` (eviction granularity = | ||
| `ttl_secs / 4`). Memory cost is `ttl_generations * cache_size_per_key` per | ||
| (metric, tag-key) pair; lower `cache_size_per_key` to keep total memory flat. | ||
| In `exact` mode this knob only controls the sweep cadence. | ||
|
|
||
| A new internal counter `tag_cardinality_ttl_expirations_total` reports how | ||
| many distinct values are evicted by TTL. | ||
|
|
||
| authors: kaarolch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.