ThresholdCounter Class
Utility counter which will send event only if the provided value is above a configured threshold
Signature
export declare class ThresholdCounter
Constructors
Constructor | Description |
---|---|
(constructor)(threshold, logger, thresholdMultiple) | Constructs a new instance of the ThresholdCounter class |
Methods
Method | Return Type | Description |
---|---|---|
send(eventName, value) | void | Sends the value if it's above the treshold. |
sendIfMultiple(eventName, value) | void |
Sends the value if it's above the treshold and a multiple of the threshold. To be used in scenarios where we'd like to record a threshold violation while reducing telemetry noise. |