semantic_logger_ecs_addon 0.1.12 → 0.1.13

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: 1e0a6e782e73897614ae1bd76e9b7c59f94d28a3a60e2cfbf22ed2209e505ac7
4
- data.tar.gz: 47eed3029664c86ebd8bac1dd16146b9685787c064e6048af62f28e4cfc43df5
3
+ metadata.gz: ce08af24030c70387cfde3b983fe760d9dffc7cb40fb474e6869c4b0e40c9e47
4
+ data.tar.gz: 92d2b5bf3a20403aac49fb04ef3f3db1b7153e44cd8137c9a4b1c9981a89e3d9
5
5
  SHA512:
6
- metadata.gz: 767d6b40db82d541e7292ac2467f4d355e6dacdac7102bb1b7fe0576337d41129e2f70766ab0bb7d5729702a7ae8479708947489e4c1d892af03ca67de892835
7
- data.tar.gz: 4777970e9fd90fb3e0706305548364e3a3d4ac1974536eb45df1627c73f12598d28fd2ce944f2bfdf26ae8149a47f5ddf92ab27ac6c88382ac99566d71837974
6
+ metadata.gz: 013e4c5ea2cc2b4e2dcdd7bbbd81e5b5fba592c7aa88edea58bef7968bb5e042e1be27e7895c424b0f6b3e05c3b2fb4c2281444f544789cfaef93327fb4bfa86
7
+ data.tar.gz: 5abe959f84462b47d8375711968e98e9b55ba5b2937974dbd72f80aada8ef2871924894381dc0cb101b66803afac15a9308dac630a7b7cc2fc9aa20532513c29
checksums.yaml.gz.sig CHANGED
Binary file
@@ -176,11 +176,13 @@ module SemanticLoggerEcsAddon
176
176
  def request
177
177
  hash[:"http.request.id"] = formatted_payload.dig :request, :request_id
178
178
  hash[:"http.request.body.content"] = formatted_payload.dig :request, :body
179
+ hash[:"http.request.body.content"] = hash[:"http.request.body.content"].to_json if hash[:"http.request.body.content"].respond_to?(:to_json)
179
180
  hash[:"http.request.method"] = formatted_payload.dig :request, :method
180
181
  end
181
182
 
182
183
  def response
183
184
  hash[:"http.response.body.content"] = formatted_payload.dig :response, :body
185
+ hash[:"http.response.body.content"] = hash[:"http.response.body.content"].to_json if hash[:"http.response.body.content"].respond_to?(:to_json)
184
186
  hash[:"http.response.status_code"] = formatted_payload.dig :response, :status
185
187
  end
186
188
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "json"
3
+ require "oj"
4
4
 
5
5
  module SemanticLoggerEcsAddon
6
6
  module Formatters
@@ -12,7 +12,7 @@ module SemanticLoggerEcsAddon
12
12
 
13
13
  # Returns log messages in JSON format
14
14
  def call log, logger
15
- super(log, logger).to_json
15
+ Oj.dump(super(log, logger), nilnil: true, symbol_keys: true, escape_mode: :json, mode: :rails)
16
16
  end
17
17
  end
18
18
  end
@@ -82,7 +82,7 @@ module SemanticLoggerEcsAddon
82
82
  end
83
83
 
84
84
  def extras
85
- return unless formatted_payload.respond_to?(:empty?) && !formatted_payload.empty?
85
+ return unless formatted_payload.respond_to?(:empty?) && !formatted_payload.empty? && formatted_payload.respond_to?(:has_key?)
86
86
 
87
87
  hash.merge! formatted_payload.except(:request, :response, :user)
88
88
  end
@@ -5,7 +5,7 @@ module SemanticLoggerEcsAddon
5
5
  module Identity
6
6
  NAME = "semantic_logger_ecs_addon"
7
7
  LABEL = "Semantic Logger Ecs Addon"
8
- VERSION = "0.1.12"
8
+ VERSION = "0.1.13"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  SUMMARY = "A semantic logger formatter that formats the logs according to Elastic Common Schema, adds APM trace data if ElasticAPM is enabled and instruments sequel logs for rails if available."
11
11
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_logger_ecs_addon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sajeev Ramasamy
@@ -34,8 +34,22 @@ cert_chain:
34
34
  vYrYpx2LhW5Xd0nPdr4aI+5BUqGdI7Ypl3BqNHZljUUlieiWu7rU0MhIZgQ1lIMa
35
35
  pQreMxz5itbb+2KmpdBlkm8nuRoFv0jrL5LR+7+UBRknGsHXaEQQcQ==
36
36
  -----END CERTIFICATE-----
37
- date: 2021-11-02 00:00:00.000000000 Z
37
+ date: 2021-11-07 00:00:00.000000000 Z
38
38
  dependencies:
39
+ - !ruby/object:Gem::Dependency
40
+ name: oj
41
+ requirement: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - "~>"
44
+ - !ruby/object:Gem::Version
45
+ version: '3.13'
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '3.13'
39
53
  - !ruby/object:Gem::Dependency
40
54
  name: request_store
41
55
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- !
2
- ���������0�K���n�h���րϮIL(��]d�z�u��r�GҪv��bn}��м���p�h�՗5O6cЄ�_�+�=�L�ۏH�k��~ߞ�#�3�8� ���ؠ�D~�\�2T�<��j��С�W���yY/ݯ���إ����l��P��|N<��h�Wr�9�A !.��f���<+�MJ����9-1OU�K,�&� �>���������Ƙ_7cʽ��M��4���՛�� ��� ��� C-�����|p9�ݞJG�m3��.��� �f�v��l��@KpVR�c� ��g+7|���{�?g��Z90y� 9���Ő{-u���ѿu�Ü���u��:� ~нn��1ה��k� f�۶�-M#�8�88�!
1
+ �d�F�
2
+ ��������z4%T<銘�®�Ţ0XЬ�
3
+ �04�&{�j<�'ɣ��.�Ѳ���xMh�}�>�����C