Skip to content
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

feature → setting ttl to clean up old metrics #87

Open
xamaterasux opened this issue Jul 4, 2024 · 0 comments
Open

feature → setting ttl to clean up old metrics #87

xamaterasux opened this issue Jul 4, 2024 · 0 comments

Comments

@xamaterasux
Copy link

Hello,

Pushing metrics from batch scripts makes memory (RSS) increase over time. Could it be created a way to clean these metrics after a defined time (ttl) instead of getting this service restarted to free this memory?


I've seen in the old project they had the idea of implementing so:

Inspecting metrics/aggregate.go I see a function:

44 func SetTTLMetricTime(duration *time.Duration) aggregateOptionsFunc {
 45     return func(a *Aggregate) {
 46         a.options.metricTTLDuration = duration
 47     }
 48 }

I think this is not being used, but I also don't know if this could be used. At the begining I thought I could set a value for this, but after searching for this function over the files I could not find a place where it was being used.

Thank you!

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

No branches or pull requests

1 participant