From 60788b81ef74bc5cccf31085510b3b2df88e09f5 Mon Sep 17 00:00:00 2001 From: Alex Koutmos Date: Tue, 1 Mar 2022 16:57:47 -0500 Subject: [PATCH] Fixing Broadway metric prefix --- lib/prom_ex/plugins/broadway.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prom_ex/plugins/broadway.ex b/lib/prom_ex/plugins/broadway.ex index 844ef7a4..21ca1b4a 100644 --- a/lib/prom_ex/plugins/broadway.ex +++ b/lib/prom_ex/plugins/broadway.ex @@ -79,7 +79,7 @@ if Code.ensure_loaded?(Broadway) do @impl true def event_metrics(opts) do otp_app = Keyword.fetch!(opts, :otp_app) - metric_prefix = PromEx.metric_prefix(otp_app, :broadway) + metric_prefix = Keyword.get(opts, :metric_prefix, PromEx.metric_prefix(otp_app, :broadway)) # Telemetry metrics will emit warnings if multiple handlers with the same names are defined. # As a result, this plugin supports gathering metrics on multiple processors and batches, but needs