node-datadog-metrics icon indicating copy to clipboard operation
node-datadog-metrics copied to clipboard

Cap the number of samples in node-datadog-metrics

Open dbader opened this issue 8 years ago • 2 comments

https://github.com/dbader/node-datadog-metrics/blob/10d3b29d1fa527807e1301857caac400c54127b6/lib/metrics.js#L133-L136

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

dbader avatar Aug 04 '16 14:08 dbader

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

csabapalfi avatar Oct 03 '16 17:10 csabapalfi

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.

dbader avatar Jan 30 '17 10:01 dbader