fluent-plugin-grafana-loki 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/fluent/plugin/out_loki.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6272020eefeef15ea9b65b49ede71e60c08c298c7c56d2ca366a95130fbf3f3a
|
4
|
+
data.tar.gz: b3699f4d8dcc778bfc63d6d2a0fe456ecfd95fb55dfbf6048af0846fdd741259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15cd081338b9da5c2b8ea7212d4ebd0cb455782cb02722992bdd671e6715d960c6a1bfb828d14a763c60175cc82d156f912a624dde81072eaeb85c726b8a06c5
|
7
|
+
data.tar.gz: dbec238d8c2e2b52c5508cc1cebe9a55677dfbb6de26de33af2b45399742fd57b8a5a727b6e763560b4f775eafa5172c4fed86e4cd9162ad06b90e2233708851
|
data/README.md
CHANGED
@@ -110,6 +110,14 @@ For example, using [fluent-plugin-record-modifier](https://github.com/repeatedly
|
|
110
110
|
</match>
|
111
111
|
```
|
112
112
|
|
113
|
+
### Using multiple buffer flush threads
|
114
|
+
|
115
|
+
Similarly, when using `flush_thread_count` > 1 in the [`buffer`](https://docs.fluentd.org/configuration/buffer-section#flushing-parameters)
|
116
|
+
section, a thread identifier must be added as a label to ensure that log chunks flushed in parallel to loki by fluentd always have increasing
|
117
|
+
times for their unique label sets.
|
118
|
+
|
119
|
+
This plugin automatically adds a `fluentd_thread` label with the name of the buffer flush thread when `flush_thread_count` > 1.
|
120
|
+
|
113
121
|
## Docker Image
|
114
122
|
|
115
123
|
There is a Docker image `grafana/fluent-plugin-grafana-loki:master` which contains default configuration files to git log information
|
@@ -267,6 +267,15 @@ module Fluent
|
|
267
267
|
line = record.to_s
|
268
268
|
end
|
269
269
|
|
270
|
+
# add buffer flush thread title as a label if there are multiple flush threads
|
271
|
+
# this prevents "entry out of order" errors in loki by making the label constellation
|
272
|
+
# unique per flush thread
|
273
|
+
# note that flush thread != fluentd worker. if you use multiple workers you still need to
|
274
|
+
# add the worker id as a label
|
275
|
+
if @buffer_config.flush_thread_count > 1
|
276
|
+
chunk_labels['fluentd_thread'] = Thread.current[:_fluentd_plugin_helper_thread_title].to_s
|
277
|
+
end
|
278
|
+
|
270
279
|
# return both the line content plus the labels found in the record
|
271
280
|
{
|
272
281
|
line: line,
|
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.
|
4
|
+
version: 1.2.7
|
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-01-
|
13
|
+
date: 2020-01-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|