moesif_rack 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/lib/moesif_rack/moesif_middleware.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59bc5bff5591983a5003206528366ee0c34f3aff
|
4
|
+
data.tar.gz: 4a0bcc09a7dcad7a050dd69c34f28c4508099d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8250f76dd528fc69e2969de9e1f1dedff45189ef312b45d5c5421005802c46079211089295a62bf5ccfffc268897f958dbed89813cee571d7f2200b185048d1e
|
7
|
+
data.tar.gz: f384af017db404d23ad402e3cc175be9043c4467a2b6e2bbd67ad32ba7cca356434072cbeaf29764a0f8fb24d32b546b16b96a4292d7e6ff41078f6ea45c89ed
|
data/README.md
CHANGED
@@ -51,16 +51,17 @@ within `config/application.rb`
|
|
51
51
|
#### Order of Middleware Matters
|
52
52
|
|
53
53
|
Since Moesif Rack is basically a logging middleware, the ordering of middleware matters for accuracy and completeness.
|
54
|
-
Many
|
54
|
+
Many middlewares are installed by default by Rails.
|
55
55
|
|
56
|
-
To see the list of
|
56
|
+
To see the list of middlewares that your system already have, type this into the bash.
|
57
57
|
|
58
58
|
```bash
|
59
59
|
bin/rails middleware
|
60
60
|
```
|
61
61
|
|
62
|
-
The best place for MoesifMidleware is on top as possible (so it captures the data closest to the wire).
|
62
|
+
The best place for "MoesifRack::MoesifMidleware" is on top as possible (so it captures the data closest to the wire).
|
63
63
|
Typically, right above the default logger of Rails apps, "Rails::Rack::Logger" is a good spot.
|
64
|
+
Or if you want to be as close as wire as possible, put it before "ActionDispatch::Static"
|
64
65
|
|
65
66
|
You should use the following line of code to insert the middleware into the right spot.
|
66
67
|
|
@@ -70,6 +71,10 @@ config.middleware.insert_before "Rails::Rack::Logger", "MoesifRack::MoesifMiddle
|
|
70
71
|
|
71
72
|
```
|
72
73
|
|
74
|
+
Please note, if you are using "Rack::Deflater" please make sure that "MoesifRack::MoesifMiddlware"
|
75
|
+
is below it, so it can capture uncompressed data.
|
76
|
+
|
77
|
+
|
73
78
|
## Configuration options
|
74
79
|
|
75
80
|
The options is a hash with these possible key value pairs.
|
@@ -38,7 +38,9 @@ module MoesifRack
|
|
38
38
|
|
39
39
|
req_headers = {}
|
40
40
|
complex_copy.select {|k,v| k.start_with? 'HTTP_'}.each do |key, val|
|
41
|
-
|
41
|
+
new_key = key.sub(/^HTTP_/, '')
|
42
|
+
new_key = new_key.sub('_', '-')
|
43
|
+
req_headers[new_key] = val
|
42
44
|
end
|
43
45
|
|
44
46
|
req_body_string = req.body.read
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moesif_rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moesif, Inc
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03-
|
12
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|