Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct { Shutdown chan struct{} // contains filtered or unexported fields }
Listener will listen for Metrics.
var MetricListener Listener
MetricListener is a singleton that handles metrics about the agent during API calls to the sdk metrics dataplane and controlplane.
func NewListenerAndStart ¶
func NewListenerAndStart(writer MetricWriter, size int, interval time.Duration) Listener
NewListenerAndStart will return a new listener and instantiate all necessary fields. In addition, this will call the Listen method in a separate go routine.
func (*Listener) Close ¶
func (l *Listener) Close()
Close will close the Shutdown channel shutting down the Listen method.
func (*Listener) CountSuccess ¶
Convenience function for success rate metrics since there's no ternary operator to do it inline
type Metric ¶
type Metric struct { Key MetricKey Stats awscsmmetrics.StatisticSet }
Metric represents a statistic set based distribution corresponding to agent api call performance
type MetricWriter ¶
MetricWriter interface that is used to write a set of metrics