Counter is an object for representing a custom cumulative counter metric. It is one of the four custom metric types.
Parameter | Type | Description |
---|---|---|
name | string | The name of the custom metric. |
Method | Description |
---|---|
Counter.add(value, [tags]) | Add a value to the counter metric. |
Counter usage in Thresholds
When Counter is used in a threshold expression, the variable must be called count or rate (lower case). For example:
- count >= 200 // value of the counter must be larger or equal to 200
- count < 10 // less than 10.
Examples
Simple example
Simple Threshold usage
Advanced Thresholds