Skip to content

metric.hb

View Markdown

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.

Category Metrics Fields 15 honeybadger-ruby

Fields

15
FieldTypeDescription
event_typestringAllowed value: metric.hb.
metric_namestringName of the metric as passed to the recording call.
metric_typestringThe metric type. Timers are gauges recorded via Honeybadger.time. Allowed values: gauge, counter, histogram, timer.
samplesintegerNumber of observations recorded in this flush window.
intervalintegerLength of the aggregation/flush window in seconds (insights.registry_flush_interval, default 60).
totalnumberSum of all recorded values in the window (gauge, timer, and histogram metrics).
minnumberMinimum recorded value in the window (gauge, timer, and histogram metrics).
maxnumberMaximum recorded value in the window (gauge, timer, and histogram metrics).
avgnumberAverage of recorded values in the window (gauge, timer, and histogram metrics).
latestnumberMost recently recorded value in the window (gauge, timer, and histogram metrics).
counternumberAccumulated counter value for the window (counter metrics).
binsarray<array<number>>Histogram bin counts as [upper_bound, count] pairs. The final bin's upper bound is 1e20, which represents infinity.
hostnamestringServer hostname. Attached to every event by default (events.attach_hostname).
environmentstringApplication environment, e.g. "production". Attached to every event by default (events.attach_environment).
metric_sourcestringSource 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"
}