peastash 0.2.4 → 0.2.5
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/README.md +2 -0
- data/lib/peastash/rails_ext/railtie.rb +1 -1
- data/lib/peastash/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3523f0e68ce08c25fb5190edc2adf0d4552e7f83fb0999bdfa2c5a0416a86f20
|
|
4
|
+
data.tar.gz: c9be85c295ef6cac39e48af37e0b0047e8612950e8588398ca8c07d11ddbad53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8502a33c3850bcb20e78a5b23612328749f69cf65c5b337540481c5bcfc2b608d64cfa54dadb6b9b51b9959c32524db820420d8b3d172a8230693fd5e5bb8073
|
|
7
|
+
data.tar.gz: b50c0f042e7828317aafd27705278c212a298cd827794f40977797333e9c7b9a7013d18dad8918f38edd6c3cc6a430b35798f3fcdf4cb2829b78d730a460990a
|
data/README.md
CHANGED
|
@@ -101,6 +101,8 @@ config.peastash.enabled = true
|
|
|
101
101
|
# You can also configure Peastash from here, for example:
|
|
102
102
|
config.peastash.output = Peastash::Outputs::IO.new(File.join(Rails.root, 'log', "logstash_#{Rails.env}.log"))
|
|
103
103
|
config.peastash.source = Rails.application.class.parent_name
|
|
104
|
+
config.peastash.before_block = ->(env, response) { Peastash.with_instance.store[:path] = Rack::Request.new(env).path }
|
|
105
|
+
config.peastash.after_block = ->(env, response) { Peastash.with_instance.store[:puma_wait] = env['puma.request_body_wait'] }
|
|
104
106
|
```
|
|
105
107
|
|
|
106
108
|
By default, Peastash's Rails integration will log the same parameters as the Middleware version, plus the fields in the payload of the [``process_action.action_controller``](http://edgeguides.rubyonrails.org/active_support_instrumentation.html#process_action.action_controller) notification (except the params).
|
|
@@ -23,7 +23,7 @@ class Peastash
|
|
|
23
23
|
Peastash.with_instance.store.merge!(payload) { |key, old_val, new_val| old_val }
|
|
24
24
|
end
|
|
25
25
|
before_middleware = app.config.peastash[:insert_before] || ActionDispatch::ShowExceptions
|
|
26
|
-
app.config.middleware.insert_before before_middleware, Peastash::Middleware
|
|
26
|
+
app.config.middleware.insert_before before_middleware, Peastash::Middleware, app.config.peastash[:before_block], app.config.peastash[:after_block]
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/peastash/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: peastash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vincent Boisard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logstash-event
|
|
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
292
292
|
- !ruby/object:Gem::Version
|
|
293
293
|
version: '0'
|
|
294
294
|
requirements: []
|
|
295
|
-
rubygems_version: 3.0.
|
|
295
|
+
rubygems_version: 3.0.3
|
|
296
296
|
signing_key:
|
|
297
297
|
specification_version: 4
|
|
298
298
|
summary: Peastash allows you to instrument your code with the ELK stack easily.
|