Metrics
Metrics are the numbers your applications measure: requests handled, queue depth, memory in use, checkout duration. Bugtail charts them over time and can alert when one crosses a line.
Sending metrics
- OpenTelemetry: export metrics to Bugtail's OTLP endpoint. See OpenTelemetry.
- HTTP: send readings in a batch. See HTTP without an SDK.
Kinds
| Kind | What it is | Shown as |
|---|---|---|
| Counter (sum) | A number that adds up, such as requests handled | The total over the chosen time range |
| Gauge | A reading of something right now, such as queue depth | The newest reading in the range |
| Histogram | A distribution, such as request durations | The count, mean, lowest and highest |
A counter that reports a running total, as OpenTelemetry does by default, is charted as the change between readings. Restarts of your process do not show up as spikes or drops.
Series
A metric with attributes, such as status=500 or route=/orders, is split into one series per combination. The metric page shows every series, and a metric alert can watch just some of them.
Keep attribute values to a small, fixed set. An id, a user or a timestamp in an attribute creates a new series for every value. There is a limit to the number of metrics and series per project; past it, new series are dropped.
Reading the numbers
Lowest and highest are the extremes of what was measured: individual readings for a gauge, and the change between readings for a counter.
Readings are added up per hour, so charts and alerts work in whole hours. Every reading counts towards the metric readings in your plan.