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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 213a63d23d18929286a8201af426fe7e2b1ff68ac8a30cc9d50dc53cff532786
4
- data.tar.gz: 9e161f20a42725baf4b32ea931cfe225516802aa0952a221a8d86ce1dbec457e
3
+ metadata.gz: a671fc16f4b05377a3e332be35f968e8802533c06c459fb2e15c074931285a58
4
+ data.tar.gz: ca4416e34b22f5a0f0d8db00cb64affd098dcc3faad39e3c26fea2294c51e340
5
5
  SHA512:
6
- metadata.gz: 4a1e38a85f385fc408f3b74b40503ff255b2c3a3c29afa37854e4562b55ee21cc1d4c348f3ffda1f2378d22195ce995e842e15cf887d32eba73891027362fbe1
7
- data.tar.gz: fd3f360ef17b0a568f30dadf56b6df6417fe725a566ece3c3e5c4af7478b2c5132fe94d0866d1a66604bd383d0ccbd66f9df903aa5df0c7d7b4b381c70fc6e78
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, severity=`DEFAULT` would be added to log. default `false`. |
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.6'
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["severity"] and @use_default_severity
111
- filteredRecord["severity"] = "DEFAULT"
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.6
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-05 00:00:00.000000000 Z
11
+ date: 2023-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd