new AwsMetricsEmitter()
Class representing an AWS CloudWatch metrics emitter.
- Source:
Members
buffer
Gets the metrics data
buffer
Sets the metrics data
lastEmit
Gets the timestamp for when the metrics were last emitted
Methods
(static) flushBuffer(awsMetricsEmitter)
Flushes the buffer of all metrics and sets a timer based on the batchDelay
Parameters:
Name | Type | Description |
---|---|---|
awsMetricsEmitter |
AwsMetricsEmitter | The aws metrics emitter that called the flush. Needed as self is not always the class the method belongs to. |
emitBuffer()
Emits all metrics.
emitNamespaceMetrics(metrics)
Emits a set of metrics for a specific namespace.
Parameters:
Name | Type | Description |
---|---|---|
metrics |
object | Metrics belonging to a single namespace. |
start()
Starts emitting metrics after the delay period.
stop()
Stops emitting metrics immediately after this call, even if the batch delay has not been reached.