sapience 2.12 → 2.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: 189ddb34ecc477adc2d44d235d2e8dac5bfad45f40539bdd6f842938e6b3cacb
4
- data.tar.gz: 1f96bc549878bca58fb5122c983eb2e75f12e6d7c5715938bd82a6316b055072
3
+ metadata.gz: 28e3ddaa9499807d47c2001cc016f996cf8d94380b1b31481a8e5a3daedf760b
4
+ data.tar.gz: c395f070f30340f87b0ffe050fb39f55b47787de6699694f4e15051e7cb84a39
5
5
  SHA512:
6
- metadata.gz: 5adb1b869eef53cde71734b7bacdbc11f31e188117d694863faeb49442f8bb0726394ad8f3e830b0da12d7ff193341f2b44db908aab13a7ddb0f2ec9b6a7388a
7
- data.tar.gz: d786d35fd92de4268bcfe6d8bc946406f40cafcd2e7fd1f56d67f32733d60c3fefefc24f8b682ba2e9c5abc6dd854ef04af3df4910f31fb5b21e16f5dbc29ec7
6
+ metadata.gz: 1f55afbf2697ec005df041b1025bdc4c25308eca276b283d3cdadb4bde200f93668d102d5e856ea3f652fc7f200420a1b2f48aa864d9bcfc7b7831e661cd0203
7
+ data.tar.gz: fab9ccb12e60fd8ab683e231b28e7c8ec7708cbdd99dcf116c82c0bdff4a2ceacd60520fad2508a467a6f1bdf3110018fb386234598d7e4cccb153ec01c5789d
@@ -1,3 +1,6 @@
1
+ ## v2.13
2
+ - Add config option to enable/disable metrics from grape
3
+
1
4
  ## v2.12
2
5
  - feature: 'log hooks', a mechanism for modifying the log event just before it is added to the appender
3
6
 
data/README.md CHANGED
@@ -128,6 +128,13 @@ API.logger = Sapience.logger
128
128
  **Note**: If you're using the rackup command to run your server in development, pass the -q flag to silence the default
129
129
  rack logger so you don't get double logging.
130
130
 
131
+
132
+ The grape integration has the following configuration options:
133
+
134
+ | Option | Description | Values | Default |
135
+ | --------------------- | ---------- | ------ | ----- |
136
+ | grape_metrics | emit metrics from grape | `boolean` | `true` |
137
+
131
138
  ### Standalone
132
139
  Add the gem:
133
140
 
@@ -9,7 +9,7 @@ module Sapience
9
9
  attr_writer :host
10
10
  attr_accessor :app_name, :ap_options, :appenders, :log_executor, :filter_parameters,
11
11
  :metrics, :error_handler, :silent_active_record, :silent_rails, :silent_rack,
12
- :rails_ac_metrics
12
+ :rails_ac_metrics, :grape_metrics
13
13
 
14
14
  SUPPORTED_EXECUTORS = %i(single_thread_executor immediate_executor).freeze
15
15
  DEFAULT = {
@@ -25,6 +25,7 @@ module Sapience
25
25
  silent_rails: false,
26
26
  silent_rack: false,
27
27
  rails_ac_metrics: true,
28
+ grape_metrics: true,
28
29
  }.freeze
29
30
 
30
31
  # Initial default Level for all new instances of Sapience::Logger
@@ -46,7 +47,8 @@ module Sapience
46
47
  self.silent_active_record = @options[:silent_active_record]
47
48
  self.silent_rails = @options[:silent_rails]
48
49
  self.silent_rack = @options[:silent_rack]
49
- self.rails_ac_metrics = @options[:rails_ac_metrics]
50
+ self.rails_ac_metrics = @options[:rails_ac_metrics]
51
+ self.grape_metrics = @options[:grape_metrics]
50
52
  end
51
53
 
52
54
  # Sets the global default log level
@@ -19,6 +19,6 @@ module Sapience
19
19
  end
20
20
  Sapience.configure
21
21
  ::Grape::API.send(:include, Sapience::Loggable)
22
- Sapience::Extensions::Grape::Notifications.use
22
+ Sapience::Extensions::Grape::Notifications.use if Sapience.config.grape_metrics
23
23
  end
24
24
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Sapience
3
- VERSION = "2.12"
3
+ VERSION = "2.13"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapience
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.12'
4
+ version: '2.13'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-10 00:00:00.000000000 Z
12
+ date: 2020-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby