Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PoolTimeInterval defines the period of time used by the Pusher to // publish the number of the checks de agent is running. PoolTimeInterval = time.Duration(5) * time.Second // PoolPeriod defines the time interval for pooling the agent for the // current number of checks running. PoolPeriod = 5 )
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent defines the functions an agent must expose for the Metrics to be able to gather metrics.
type Metrics ¶
type Metrics struct { Enabled bool Client metrics.Client Aborter Agent AgentID string Logger log.Logger }
Metrics sends the defined metrics for an agent to Data Dog.
func NewMetrics ¶
NewMetrics return a new struct which sends the defined metrics for the agent to DD.
func (*Metrics) AbortCheck ¶
AbortCheck just wraps the AbortCheck function of the "actual" check aborter in order to push metrics every time a new message has been received.
func (*Metrics) StartPolling ¶
StartPolling pools every PoolIntervalSeconds the current number the agent is running and sends the metric to the Data Dog.
Click to show internal directories.
Click to hide internal directories.