lorekeeper 1.8.0 → 1.9.0

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
- SHA256:
3
- metadata.gz: b72498ad2cf067d82c9371e7affa84ce85974332d2eaa962d34fa9b687ff897f
4
- data.tar.gz: af9356d08c95dbadd903dd340a3a3acbe8f1d26768333e20add816f232f93bf8
2
+ SHA1:
3
+ metadata.gz: 20607700d6213a2dbeaa828a691db22d62c8faf4
4
+ data.tar.gz: ea7a417e437eec8f98699cba4c9a8c56db56facd
5
5
  SHA512:
6
- metadata.gz: a1e4267df3ae911fccb7245e22f6c8271df78e4d454e39740fb966cb881cadeb27ee67cfef54b3f580ffa554bd1c0370895c9287af6b5c25a8fd5dd8ed90659e
7
- data.tar.gz: a7e7c0f9c916abf6bb575053ba6a5ce29832ff0eb0f4bdc7f9044bd2a615c0eacb5f6c0a9aa32e063d11bcce83f68fa67ecc86875b379db9f9e3bc77efee22b3
6
+ metadata.gz: cda5c319cb5f3baa40c949e07fc4f25ac34acbb349af2c1b08a336e192f55da0faecd9b1a4c19cf24d1a5361141a5731c8670835dfe935432c27f41d052fe300
7
+ data.tar.gz: 2751f693aa13f17d287e189c1425c4ef2ed4879ba3b2074aea74e18e11c2391f4118ec59c7bc2e61a67fb0152fa312ff394081c1fc0cf49c55d6cddf28010fad
@@ -1,3 +1,6 @@
1
+ # 1.9.0
2
+ * Remove Newrelic instrumentation information from stacktrace output
3
+
1
4
  # 1.8.0
2
5
  * Allow to use named parameters in the .exception method
3
6
 
@@ -73,7 +73,7 @@ module Lorekeeper
73
73
  log_level = METHOD_SEVERITY_MAP[param_level] || ERROR
74
74
 
75
75
  if exception.is_a?(Exception)
76
- backtrace = exception.backtrace || []
76
+ backtrace = clean_backtrace(exception.backtrace || [])
77
77
  exception_fields = {
78
78
  EXCEPTION => "#{exception.class}: #{exception.message}",
79
79
  STACK => backtrace
@@ -95,6 +95,15 @@ module Lorekeeper
95
95
 
96
96
  private
97
97
 
98
+ # Some instrumentation libraries pollute the stacktrace and create a large output which may
99
+ # cause problems with certain logging backends.
100
+ # Hardcoring newrelic now here. In the future if this list grows, we may make it configurable.
101
+ def clean_backtrace(backtrace)
102
+ backtrace.reject do |line|
103
+ line.include?(BLACKLISTED_FINGERPRINT)
104
+ end
105
+ end
106
+
98
107
  THREAD_KEY = 'lorekeeper_jsonlogger_key' # Shared by all threads but unique by thread
99
108
  LEVEL = 'level'
100
109
  MESSAGE = 'message'
@@ -103,6 +112,7 @@ module Lorekeeper
103
112
  EXCEPTION = 'exception'
104
113
  STACK = 'stack'
105
114
  DATA = 'data'
115
+ BLACKLISTED_FINGERPRINT = '/newrelic_rpm-'
106
116
 
107
117
  def with_extra_fields(fields)
108
118
  state[:extra_fields] = fields
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lorekeeper
4
- VERSION = '1.8.0'
4
+ VERSION = '1.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorekeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-03 00:00:00.000000000 Z
11
+ date: 2019-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -206,7 +206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubygems_version: 3.0.2
209
+ rubyforge_project:
210
+ rubygems_version: 2.6.14
210
211
  signing_key:
211
212
  specification_version: 4
212
213
  summary: Very fast JSON logger