lorekeeper 1.9.0 → 1.10.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
- SHA1:
3
- metadata.gz: 20607700d6213a2dbeaa828a691db22d62c8faf4
4
- data.tar.gz: ea7a417e437eec8f98699cba4c9a8c56db56facd
2
+ SHA256:
3
+ metadata.gz: d211ca03f7364fb674acbd2b0b8916dc1406efcb5299007fe203e3d594348fce
4
+ data.tar.gz: 0caccf6617f49aa5d37ad9bad1c81d9256717dff0967b1144eefaaeae233a4df
5
5
  SHA512:
6
- metadata.gz: cda5c319cb5f3baa40c949e07fc4f25ac34acbb349af2c1b08a336e192f55da0faecd9b1a4c19cf24d1a5361141a5731c8670835dfe935432c27f41d052fe300
7
- data.tar.gz: 2751f693aa13f17d287e189c1425c4ef2ed4879ba3b2074aea74e18e11c2391f4118ec59c7bc2e61a67fb0152fa312ff394081c1fc0cf49c55d6cddf28010fad
6
+ metadata.gz: 6a17d81d686474f260955cdf7cdcd5a89ec664dd64d5781549002d69359e27d3a4ea34614d113847f4a657cd1208c3bf7832fef6af8a99155f2176e4bc7442ae
7
+ data.tar.gz: 2a06e800054576f0eae66bbf19d6a016c744ef52c7ca0ca5aef63b25dd78e1f0ff10caea743acd2e370f080b6c5b2e147ef8235dbefd19909122c916f644e502
@@ -2,14 +2,8 @@ language: ruby
2
2
  cache: bundler
3
3
 
4
4
  rvm:
5
- - 2.3.8
6
- - 2.4.6
7
- - 2.5.5
8
- - 2.6.3
9
-
10
- before_install:
11
- - gem install rubygems-update -v 2.7.8
12
- - gem install bundler -v 1.17.3
13
- - bundle --version
5
+ - 2.4.9
6
+ - 2.5.7
7
+ - 2.6.5
14
8
 
15
9
  script: bundle exec rspec
@@ -1,3 +1,6 @@
1
+ # 1.10.0
2
+ * Use ActiveSupport::BacktraceCleaner to reduce noise in stacktrace output
3
+
1
4
  # 1.9.0
2
5
  * Remove Newrelic instrumentation information from stacktrace output
3
6
 
@@ -9,6 +9,7 @@ module Lorekeeper
9
9
  def initialize(file)
10
10
  reset_state
11
11
  @base_fields = { MESSAGE => '', TIMESTAMP => '', LEVEL => '' }
12
+ @backtrace_cleaner = set_backtrace_cleaner
12
13
  super(file)
13
14
  end
14
15
 
@@ -97,11 +98,19 @@ module Lorekeeper
97
98
 
98
99
  # Some instrumentation libraries pollute the stacktrace and create a large output which may
99
100
  # cause problems with certain logging backends.
100
- # Hardcoring newrelic now here. In the future if this list grows, we may make it configurable.
101
+ # Hardcording newrelic and active_support/callbacks now here.
102
+ # In the future if this list grows, we may make it configurable.
101
103
  def clean_backtrace(backtrace)
102
- backtrace.reject do |line|
103
- line.include?(BLACKLISTED_FINGERPRINT)
104
- end
104
+ @backtrace_cleaner&.clean(backtrace) || backtrace
105
+ end
106
+
107
+ def set_backtrace_cleaner
108
+ return nil unless defined?(ActiveSupport::BacktraceCleaner)
109
+
110
+ cleaner = ActiveSupport::BacktraceCleaner.new
111
+ cleaner.remove_silencers!
112
+ cleaner.add_silencer { |line| line.match?(BLACKLISTED_FINGERPRINT) }
113
+ cleaner
105
114
  end
106
115
 
107
116
  THREAD_KEY = 'lorekeeper_jsonlogger_key' # Shared by all threads but unique by thread
@@ -112,7 +121,7 @@ module Lorekeeper
112
121
  EXCEPTION = 'exception'
113
122
  STACK = 'stack'
114
123
  DATA = 'data'
115
- BLACKLISTED_FINGERPRINT = '/newrelic_rpm-'
124
+ BLACKLISTED_FINGERPRINT = %r{newrelic_rpm|active_support/callbacks.rb}.freeze
116
125
 
117
126
  def with_extra_fields(fields)
118
127
  state[:extra_fields] = fields
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lorekeeper
4
- VERSION = '1.9.0'
4
+ VERSION = '1.10.0'
5
5
  end
@@ -20,10 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.required_ruby_version = '>= 2.3.0'
23
+ spec.required_ruby_version = '>= 2.4.0'
24
24
 
25
25
  spec.add_dependency 'oj', '>= 3.4', '< 4.0'
26
26
 
27
+ spec.add_development_dependency 'activesupport', '>= 4.0'
27
28
  spec.add_development_dependency 'bundler', '>= 1.16', '< 3.0'
28
29
  spec.add_development_dependency 'rake', '~> 12.0'
29
30
  spec.add_development_dependency 'rspec', '~> 3.8'
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.9.0
4
+ version: 1.10.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-07 00:00:00.000000000 Z
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -30,6 +30,20 @@ dependencies:
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '4.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: activesupport
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '4.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '4.0'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: bundler
35
49
  requirement: !ruby/object:Gem::Requirement
@@ -199,15 +213,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
213
  requirements:
200
214
  - - ">="
201
215
  - !ruby/object:Gem::Version
202
- version: 2.3.0
216
+ version: 2.4.0
203
217
  required_rubygems_version: !ruby/object:Gem::Requirement
204
218
  requirements:
205
219
  - - ">="
206
220
  - !ruby/object:Gem::Version
207
221
  version: '0'
208
222
  requirements: []
209
- rubyforge_project:
210
- rubygems_version: 2.6.14
223
+ rubygems_version: 3.0.2
211
224
  signing_key:
212
225
  specification_version: 4
213
226
  summary: Very fast JSON logger