Skip to main content

Crate hyperlane_plugin_metrics

Crate hyperlane_plugin_metrics 

Source
Expand description

hyperlane-plugin-metrics

Lock-free atomic Prometheus/OpenMetrics observability plugin for Hyperlane with built-in HTTP request counters, in-flight gauges, fixed-bucket latency histograms, custom metric handles, and a scrapeable /metrics endpoint.

Structs§

Counter
Lock-free monotonically increasing 64-bit counter metric.
Gauge
Lock-free signed 64-bit gauge metric that may increment or decrement.
Histogram
Lock-free fixed-bucket latency/size histogram metric.
MetricsConfig
Configuration for MetricsPlugin and MetricsRequestHook.
MetricsPlugin
Process-wide MetricsPlugin singleton storing MetricsConfig and MetricsRegistry.
MetricsRegistry
Lock-free HTTP and custom application metrics registry with Prometheus 0.0.4 exposition.
MetricsRequestHook
Opt-in request middleware incrementing in-flight gauges and serving /metrics scrapes.
MetricsResponseHook
Opt-in response middleware recording status class, response bytes, and request duration.

Constants§

DEFAULT_LATENCY_BUCKETS
Default latency histogram bucket upper bounds in seconds.
DEFAULT_METRICS_ENDPOINT
Default Prometheus scrape endpoint path.
DEFAULT_METRICS_NAMESPACE
Default metric prefix namespace.
PROMETHEUS_CONTENT_TYPE
Prometheus text exposition format 0.0.4 Content-Type header value.