Class: StatsDMetric

Inherits:
Common::RedisStore show all
Defined in:
lib/stats_d_metric.rb

Overview

This model is responsible for keeping track of the dynamic metrics that get incremented by /lib/common/client/concerns/monitoring.rb , for the purpose of initializing them to zero at vets-api initialization time

When a metric is incremented by /lib/common/client/concerns/monitoring.rb, we save that metric name as a StatsDMetric, e.g. in Redis:

=> {}

In the event that the metric name already exists, the Redis TTL is refreshed. At vets-api initialization time, this list is read from Redis and initialized to zero (e.g. StatsD.increment(“<NAME FROM REDIS>”, 0)). For metrics that are not refreshed, they expire from Redis and will not be initialized to 0 on future ‘vets-api` initializations.

Constant Summary

Constants inherited from Common::RedisStore

Common::RedisStore::REQ_CLASS_INSTANCE_VARS

Method Summary

Methods inherited from Common::RedisStore

create, delete, #destroy, #destroyed?, exists?, #expire, find, find_or_build, #initialize, #initialize_dup, keys, #persisted?, pop, redis_key, redis_store, redis_ttl, #save, #save!, #ttl, #update, #update!

Constructor Details

This class inherits a constructor from Common::RedisStore