diff --git a/fluentd/fluent-plugin-grafana-loki/fluent-plugin-grafana-loki.gemspec b/fluentd/fluent-plugin-grafana-loki/fluent-plugin-grafana-loki.gemspec index dc15c6ed4379c..601b5c317e87e 100644 --- a/fluentd/fluent-plugin-grafana-loki/fluent-plugin-grafana-loki.gemspec +++ b/fluentd/fluent-plugin-grafana-loki/fluent-plugin-grafana-loki.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |spec| spec.name = 'fluent-plugin-grafana-loki' - spec.version = '1.2.4' + spec.version = '1.2.5' spec.authors = %w[woodsaj briangann cyriltovena] spec.email = ['awoods@grafana.com', 'brian@grafana.com' , 'cyril.tovena@grafana.com'] diff --git a/fluentd/fluent-plugin-grafana-loki/lib/fluent/plugin/out_loki.rb b/fluentd/fluent-plugin-grafana-loki/lib/fluent/plugin/out_loki.rb index a5033729f9355..f92ab515043f8 100644 --- a/fluentd/fluent-plugin-grafana-loki/lib/fluent/plugin/out_loki.rb +++ b/fluentd/fluent-plugin-grafana-loki/lib/fluent/plugin/out_loki.rb @@ -195,7 +195,7 @@ def format_labels(data_labels) data_labels = {} if data_labels.nil? data_labels = data_labels.merge(@extra_labels) # sanitize label values - data_labels.each { |k, v| formatted_labels[k] = v.gsub('"', '\\"') } + data_labels.each { |k, v| formatted_labels[k] = v.gsub('"', '\\"') if v } formatted_labels end