From 0ea879d727db0dcf3367424b05564787446a9de9 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Mon, 23 Jun 2025 11:26:17 +0200 Subject: [PATCH] Fix warning on nil tag Signed-off-by: Colin Leroy-Mira --- lib/fluent/plugin/prometheus/placeholder_expander.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fluent/plugin/prometheus/placeholder_expander.rb b/lib/fluent/plugin/prometheus/placeholder_expander.rb index 53f5d28..79f205a 100644 --- a/lib/fluent/plugin/prometheus/placeholder_expander.rb +++ b/lib/fluent/plugin/prometheus/placeholder_expander.rb @@ -39,6 +39,8 @@ def build(placeholder_values) private def build_tag(tag) + return [] if tag.nil? + tags = tag.split('.') placeholders = { '${tag}' => tag }