brightcove / hot-shots

Node.js client for statsd, DogStatsD, and Telegraf
MIT License
527 stars 135 forks source link

Question: What is the recommended lifetime of a client? #249

Closed MikeOBarometer closed 1 year ago

MikeOBarometer commented 1 year ago

The example mentions this about close

  // Close statsd.  This will ensure all stats are sent and stop statsd
  // from doing anything more.

Are stats not sent until we close? What is the recommended lifetime for a client? Should it live as long as the service does OR should it be created/closed as needed?

bdeitte commented 1 year ago

clients can live as long as needed- this just means that any stats that are outstanding are sent