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

Cap the number of samples in node-datadog-metrics #19

Open
dbader opened this issue Aug 4, 2016 · 2 comments
Open

Cap the number of samples in node-datadog-metrics #19

dbader opened this issue Aug 4, 2016 · 2 comments

Comments

@dbader
Copy link
Owner

dbader commented Aug 4, 2016

// The number of samples recorded is unbounded at the moment.
// If this becomes a problem we might want to limit how many
// samples we keep.
this.samples.push(val);

If ddog is down this will hog a lot of memory.

@csabapalfi
Copy link
Collaborator

Have you considered using https://github.com/circonus-labs/circllhist.js ?

@dbader
Copy link
Owner Author

dbader commented Jan 30, 2017

Personally, I'd be in favor of a simple solution like dropping new/old samples if the buffer is full. Especially for a first implementation to plug the memory issue.

Under normal operation it should be quite rare we encounter this situation. For my use cases, it would be okay to drop samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants