fluent-plugin-grafana-loki 1.2.15 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9da0220850d940db558feefbf825cd3e1b5a73c73f0a2e35516c98a9bc86f4f8
4
- data.tar.gz: 50f3c8cfda6747c98cf0335f6cf60705b828e34e44c5372ac9ff5c13f59caf96
3
+ metadata.gz: d69446470f9b77ceaf43e03d15948de4afbf0573a0a1be6ca1825aaa43075a90
4
+ data.tar.gz: dbc6e1481ee9b55a236f5316f00f92631970fd5ed990c3f7e2c595d25e90bac1
5
5
  SHA512:
6
- metadata.gz: 64ee54f30a6cb6da3c5b2725eebe9f3a8b25e41ba51bcf8027d876d33080ffbd831371252ba05f39a3dced2fad6d94a9b35f918d4be060e25f3d690223005a06
7
- data.tar.gz: f6c507d56f16056306e8f53688a5a509cb1425947b57dba7e143aa4b2496dcb438adc38be2a1b9bde4051ef8c522214f514149888bb93fcd38760f08db143968
6
+ metadata.gz: 05165c783cf297c4e2cb64f5e421ea5b6c8aae41894269c06500177b722d82250cf8a78040c6e7389dab840e463a65f78e8ce4e07ae04dcd8fb7f66a4f90fe19
7
+ data.tar.gz: 0e8b7dab804916783771976c39eb3a9e1edbd3ed54438c72119ba9b0aef79e490af47e626c044084d80b0273d3eb22cfc71b345a0c01a22299da6b83c73d697f
@@ -278,7 +278,13 @@ module Fluent
278
278
  when :key_value
279
279
  formatted_labels = []
280
280
  record.each do |k, v|
281
- formatted_labels.push(%(#{k}="#{v}"))
281
+ # Escape double quotes and backslashes by prefixing them with a backslash
282
+ v = v.to_s.gsub(%r{(["\\])}, '\\\\\1')
283
+ if v.include?(' ') || v.include?('=')
284
+ formatted_labels.push(%(#{k}="#{v}"))
285
+ else
286
+ formatted_labels.push(%(#{k}=#{v}))
287
+ end
282
288
  end
283
289
  line = formatted_labels.join(' ')
284
290
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-grafana-loki
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.15
4
+ version: 1.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - woodsaj
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-10-16 00:00:00.000000000 Z
13
+ date: 2020-10-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fluentd