metric.hb
A metric recorded through Honeybadger’s instrumentation API and flushed by the metrics registry. The metric_type field tells you whether the event came from gauge, increment_counter, decrement_counter, histogram, or time.
Fields
15| Field | Type | Description |
|---|---|---|
event_type | string | Allowed value: metric.hb. |
metric_name | string | Name of the metric as passed to the recording call. |
metric_type | string | The metric type. Timers are gauges recorded via Honeybadger.time. Allowed values: gauge, counter, histogram, timer. |
samples | integer | Number of observations recorded in this flush window. |
interval | integer | Length of the aggregation/flush window in seconds (insights.registry_flush_interval, default 60). |
total | number | Sum of all recorded values in the window (gauge, timer, and histogram metrics). |
min | number | Minimum recorded value in the window (gauge, timer, and histogram metrics). |
max | number | Maximum recorded value in the window (gauge, timer, and histogram metrics). |
avg | number | Average of recorded values in the window (gauge, timer, and histogram metrics). |
latest | number | Most recently recorded value in the window (gauge, timer, and histogram metrics). |
counter | number | Accumulated counter value for the window (counter metrics). |
bins | array<array<number>> | Histogram bin counts as [upper_bound, count] pairs. The final bin's upper bound is 1e20, which represents infinity. |
hostname | string | Server hostname. Attached to every event by default (events.attach_hostname). |
environment | string | Application environment, e.g. "production". Attached to every event by default (events.attach_environment). |
metric_source | string | Source plugin or component that recorded the metric, e.g. "rails", "sidekiq", "solid_queue", "net_http", "puma", "autotuner". |
Example
{ "event_type": "metric.hb", "metric_name": "duration.process_action.action_controller", "metric_type": "gauge", "metric_source": "rails", "samples": 20, "interval": 60, "total": 1820.5, "min": 12.3, "max": 210.4, "avg": 91.03, "latest": 88.6, "hostname": "web-1.example.com", "environment": "production"}