Import
Metric Types
Counter
Counter is a cumulative metric that only increases. Use it to count events, errors, or accumulate values.The name of the custom metric.
add(value, [tags])- Add a value to the counter
count- The total count valuerate- The rate of the counter
count >= 200, count < 10
Gauge
Gauge holds only the latest value added. Use it for tracking current state or the most recent measurement.The name of the custom metric.
Indicates whether the values are time values or untyped values.
add(value, [tags])- Add a value to the gauge (only the latest value is kept)
value- The current gauge value
value < 200, value > 1
Rate
Rate tracks the percentage of added values that are non-zero. Use it for calculating success/failure rates.The name of the custom metric.
add(value, [tags])- Add a boolean or numeric value (non-zero counts as true)
rate- The rate value between 0.00 and 1.00
rate < 0.1 (less than 10%), rate >= 0.9 (90% or more)
Trend
Trend calculates statistics on added values (min, max, average, percentiles). Use it for timing measurements and performance analysis.The name of the custom metric.
Indicates whether the values are time values (in milliseconds) or untyped values.
add(value, [tags])- Add a value to the trend
avg- Average valuemin- Minimum value (not recommended for thresholds)max- Maximum value (not recommended for thresholds)med- Median valuep(N)- Specific percentile (N between 0.0 and 100.0)
p(95) < 400- 95% of requests finish below 400msp(99) < 1000- 99% of requests finish within 1sp(50) < 200- Half of requests finish within 200msmax < 3000- Slowest request finishes within 3s