Skip to content

fix: ignore modifications to unregistered metrics#21

Merged
sprsquish merged 1 commit into
developfrom
ignore-unregistered
Dec 15, 2025
Merged

fix: ignore modifications to unregistered metrics#21
sprsquish merged 1 commit into
developfrom
ignore-unregistered

Conversation

@sprsquish
Copy link
Copy Markdown
Collaborator

Despite the expiration logic, we were still consuming memory at an alarming rate. Pretty much the same rate as before. If a high cardinality metric that we want to ignore is lumped into a call with a metric we want to keep, we'll update the high cardinality metric. We don't register it, though, so we don't report it. However, it still consumes memory.

We could go at this one of two ways: 1) break up the API calls so we don't request the information from CF and don't update the metric at all; 2) check if we've registered the metric and ignore any call to its update method. This change updates the new metric tracking infrastructure to use option 2.

I also took the opportunity to refactor the Collector implementation for tracked metrics and vibe coded a set of tests (with my own tweaks).

@sprsquish sprsquish merged commit 1bcdc2c into develop Dec 15, 2025
3 checks passed
@sprsquish sprsquish deleted the ignore-unregistered branch December 15, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants