diff --git a/lib/fluent/plugin/out_splunk.rb b/lib/fluent/plugin/out_splunk.rb index c2bd758..ee3e069 100644 --- a/lib/fluent/plugin/out_splunk.rb +++ b/lib/fluent/plugin/out_splunk.rb @@ -193,8 +193,8 @@ def prepare_key_fields v = instance_variable_get "@#{f}" next unless v - if v == TAG_PLACEHOLDER - instance_variable_set "@#{f}", ->(tag, _) { tag } + if v.include? TAG_PLACEHOLDER + instance_variable_set "@#{f}", ->(tag, _) { v.gsub(TAG_PLACEHOLDER, tag) } else instance_variable_set "@#{f}", ->(_, _) { v } end