# HG changeset patch # User Kim Alvefur # Date 1723826386 -7200 # Node ID f14066ee3239806a9bee2b7e4c237ee0faa5fcaf # Parent eac86b5fb04b0ab67910adb85f9e31108258ee4f mod_s2s_bidi: Include empty list of labels in metrics Throws error attempting to append the nil label list to an array for host-scoped metrics. diff -r eac86b5fb04b -r f14066ee3239 plugins/mod_s2s_bidi.lua --- a/plugins/mod_s2s_bidi.lua Fri Aug 16 17:06:41 2024 +0200 +++ b/plugins/mod_s2s_bidi.lua Fri Aug 16 18:39:46 2024 +0200 @@ -12,9 +12,9 @@ local require_encryption = module:get_option_boolean("s2s_require_encryption", true); -local offers_sent = module:metric("counter", "offers_sent", "", "Bidirectional connection offers sent"); -local offers_recv = module:metric("counter", "offers_recv", "", "Bidirectional connection offers received"); -local offers_taken = module:metric("counter", "offers_taken", "", "Bidirectional connection offers taken"); +local offers_sent = module:metric("counter", "offers_sent", "", "Bidirectional connection offers sent", {}); +local offers_recv = module:metric("counter", "offers_recv", "", "Bidirectional connection offers received", {}); +local offers_taken = module:metric("counter", "offers_taken", "", "Bidirectional connection offers taken", {}); module:hook("s2s-stream-features", function(event) local origin, features = event.origin, event.features;