masque_metrics (masque v0.7.0)
View SourceMetrics instrumentation for masque tunnels.
Uses instrument_meter to track tunnel lifecycle, throughput, and rejections. Call setup/0 from application start. Instruments are stored in persistent_term for zero-overhead lookups.
Summary
Functions
Idempotent allocator for the IP-side simple counters. Safe to call multiple times; only the first call wins (subsequent calls keep the existing reference so counts accumulated from earlier callers are preserved).
Functions
-spec bytes_in(non_neg_integer(), map()) -> ok.
-spec bytes_out(non_neg_integer(), map()) -> ok.
-spec ip_advertise_inc() -> ok.
-spec ip_advertised_count() -> non_neg_integer().
-spec ip_assign_inc() -> ok.
-spec ip_assigned_count() -> non_neg_integer().
-spec ip_drop_count(atom()) -> non_neg_integer().
-spec ip_drop_inc(atom()) -> ok.
-spec ip_drop_reasons() -> [atom()].
-spec ip_release_inc() -> ok.
-spec ip_released_count() -> non_neg_integer().
-spec setup() -> ok.
-spec setup_ip_counters() -> ok.
Idempotent allocator for the IP-side simple counters. Safe to call multiple times; only the first call wins (subsequent calls keep the existing reference so counts accumulated from earlier callers are preserved).
-spec tunnel_opened(map()) -> ok.
-spec tunnel_rejected(map()) -> ok.