ecs_log_rails 0.1.1 → 0.1.2
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/lib/ecs_log_rails/ecs_formatter.rb +6 -2
- data/lib/ecs_log_rails/version.rb +1 -1
- 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: cd1b34b42d808de7704a6bc3fcd5240589b8564eb2f352e2b4ab57b8198919da
|
|
4
|
+
data.tar.gz: bcfc234ba61e9f281719da5b3e2db82dcba3f23b4e75fea51e964e1d5c2b692a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 346417ab21c86105bce5f6a1dd8bda4de0c31126d70418b5142f6c99c31c7f1e9f992c3c21162233826a2410f32578b0b7f4c5fc9b890c93c8af3842a8dec3ae
|
|
7
|
+
data.tar.gz: 2fa28ac0d4ad163d9dd9336a9ec705b1713f4e3395453252a0f869e2be2af6c5c35a22eab52ce40b2b3fefdde044ce9e050d73452a9cb4b0e7dca7288889adc6
|
|
@@ -10,7 +10,6 @@ class EcsFormatter
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def call(data)
|
|
13
|
-
@ecs_data = {}
|
|
14
13
|
@data = data
|
|
15
14
|
generate_ecs
|
|
16
15
|
event = LogStash::Event.new(deep_compact(ecs_data))
|
|
@@ -20,6 +19,7 @@ class EcsFormatter
|
|
|
20
19
|
private
|
|
21
20
|
|
|
22
21
|
def generate_ecs
|
|
22
|
+
init_ecs
|
|
23
23
|
add_http
|
|
24
24
|
add_url
|
|
25
25
|
add_event
|
|
@@ -31,6 +31,10 @@ class EcsFormatter
|
|
|
31
31
|
add_custom_payload
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def init_ecs
|
|
35
|
+
@ecs_data = {}
|
|
36
|
+
end
|
|
37
|
+
|
|
34
38
|
def add_http
|
|
35
39
|
ecs_add(:http, {
|
|
36
40
|
request: {
|
|
@@ -84,7 +88,7 @@ class EcsFormatter
|
|
|
84
88
|
ecs_add(:rails, {
|
|
85
89
|
controller: data[:controller],
|
|
86
90
|
action: data[:action],
|
|
87
|
-
params: data[:params],
|
|
91
|
+
params: data[:params].to_s,
|
|
88
92
|
view_runtime: data[:view],
|
|
89
93
|
db_runtime: data[:db]
|
|
90
94
|
})
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ecs_log_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Francesco Coda Zabetta
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-06-
|
|
11
|
+
date: 2023-06-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lograge
|