fluent-plugin-lm-logs-gcp 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/fluent-plugin-lm-logs-gcp.gemspec +1 -1
- data/lib/fluent/plugin/filter_gcplm.rb +3 -3
- 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: a671fc16f4b05377a3e332be35f968e8802533c06c459fb2e15c074931285a58
|
4
|
+
data.tar.gz: ca4416e34b22f5a0f0d8db00cb64affd098dcc3faad39e3c26fea2294c51e340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7011b54f3755f971eda3f273ad9b53db28b29db0b741f8d5391fa40d5cb089dd5027725e38d4ddddba4a6a7fd3f8acef874c5f12cdd0c8023fc690ccf970208e
|
7
|
+
data.tar.gz: 93ccea85e676715def658ce3fec3df4f88cdece0a08b6c2684127d8f5bfd6624f16d169344305966aa6bdf183a6996d688f1cfddbde8d82940bdde49047e311a
|
data/README.md
CHANGED
@@ -12,4 +12,4 @@ This filter plugin is provided for mapping the logs coming from GCP pubsub to '_
|
|
12
12
|
| Property | Description |
|
13
13
|
| --- | --- |
|
14
14
|
| `metadata_keys` | Array of keys to be added as metadata. Filter will look for these keys in fluentd record and extract those if exist. in case of nested json, whole sub json would be added. default ` ["severity", "logName", "labels", "resource.type", "resource.labels", "httpRequest"] ` . few keys will be renamed as part of metadata standardization in Logicmonitor : ` {"trace" => "trace_id", "spanId" => "span_id","resource.type" => "_type"}`|
|
15
|
-
| `use_default_severity` | When `true`, and log record does not have severity,
|
15
|
+
| `use_default_severity` | When `true`, and log record does not have severity, log_level=`DEFAULT` would be added to log. default `false`. |
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "fluent-plugin-lm-logs-gcp"
|
8
|
-
spec.version = '1.0.
|
8
|
+
spec.version = '1.0.7'
|
9
9
|
spec.authors = ["LogicMonitor"]
|
10
10
|
spec.email = "rubygems@logicmonitor.com"
|
11
11
|
spec.summary = "LogicMonitor with GCP logs fluentd filter plugin"
|
@@ -4,7 +4,7 @@ module Fluent::Plugin
|
|
4
4
|
class GCPLMFilter < Filter
|
5
5
|
Fluent::Plugin.register_filter('gcplm', self)
|
6
6
|
|
7
|
-
METADATA_KEYS_TO_RENAME = {"trace" => "trace_id", "spanId" => "span_id","resource.type" => "_type"}.freeze
|
7
|
+
METADATA_KEYS_TO_RENAME = {"trace" => "trace_id", "spanId" => "span_id","resource.type" => "_type", "severity" => "log_level"}.freeze
|
8
8
|
STATIC_METADATA = {"_integration" => "gcp"}
|
9
9
|
|
10
10
|
config_param :metadata_keys, :array, default: ["severity", "logName", "labels", "resource.type", "resource.labels", "httpRequest"], value_type: :string
|
@@ -107,8 +107,8 @@ module Fluent::Plugin
|
|
107
107
|
STATIC_METADATA.each { | key, value| filteredRecord[key] = value }
|
108
108
|
|
109
109
|
# Add default severity if does not exist
|
110
|
-
if !filteredRecord["
|
111
|
-
filteredRecord["
|
110
|
+
if !filteredRecord["log_level"] and @use_default_severity
|
111
|
+
filteredRecord["log_level"] = "DEFAULT"
|
112
112
|
end
|
113
113
|
|
114
114
|
filteredRecord
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-lm-logs-gcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LogicMonitor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|