appsignal 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/Rakefile +1 -0
- data/gemfiles/rails-4.1.gemfile +1 -1
- data/gemfiles/rails-4.2.gemfile +7 -0
- data/lib/appsignal/rack/instrumentation.rb +3 -2
- data/lib/appsignal/transaction.rb +3 -3
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/rack/instrumentation_spec.rb +24 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d41abe0ea106adaa95e6273e1187136769252aaf
|
4
|
+
data.tar.gz: 3c1e7c0345cdd1e32eff0d33493025ac13b4e24f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d3dc0a5722caa2109cd7b15ef2bf9929df3e1927b6d2e16f17de79d27d01724d62f8266e4274a6dc8d4b9ea0d8bbf55786ad12f1d19dceaa4ebfde5d852f80f
|
7
|
+
data.tar.gz: 28001d15fced01dd048fd66dada12216ed8044cae66b0d7354964a1fcf6a467341a37003edb03b216af13a505052590d8842d1c3419eb24fec7870cf5fb8adfb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 0.11.1
|
2
|
+
* Allow a custom request_class and params_method on Rack instrumentation
|
3
|
+
* Loop through env methods instead of env
|
4
|
+
* Add HTTP_CLIENT_IP to env methods
|
5
|
+
|
1
6
|
# 0.11.0
|
2
7
|
* Improved inter process communication
|
3
8
|
* Retry sending data when the push api is not reachable
|
data/README.md
CHANGED
@@ -67,6 +67,7 @@ bundle --gemfile gemfiles/rails-3.1.gemfile
|
|
67
67
|
bundle --gemfile gemfiles/rails-3.2.gemfile
|
68
68
|
bundle --gemfile gemfiles/rails-4.0.gemfile
|
69
69
|
bundle --gemfile gemfiles/rails-4.1.gemfile
|
70
|
+
bundle --gemfile gemfiles/rails-4.2.gemfile
|
70
71
|
bundle --gemfile gemfiles/sinatra.gemfile
|
71
72
|
```
|
72
73
|
|
@@ -81,6 +82,7 @@ BUNDLE_GEMFILE=gemfiles/rails-3.1.gemfile bundle exec rspec
|
|
81
82
|
BUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec
|
82
83
|
BUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec
|
83
84
|
BUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec
|
85
|
+
BUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec
|
84
86
|
BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
|
85
87
|
```
|
86
88
|
|
data/Rakefile
CHANGED
data/gemfiles/rails-4.1.gemfile
CHANGED
@@ -16,10 +16,11 @@ module Appsignal
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def raw_payload(env)
|
19
|
-
request = ::Rack::Request.new(env)
|
19
|
+
request = @options.fetch(:request_class, ::Rack::Request).new(env)
|
20
|
+
params = request.public_send(@options.fetch(:params_method, :params))
|
20
21
|
{
|
21
22
|
:action => "#{request.request_method}:#{request.path}",
|
22
|
-
:params =>
|
23
|
+
:params => params,
|
23
24
|
:method => request.request_method,
|
24
25
|
:path => request.path
|
25
26
|
}
|
@@ -9,7 +9,7 @@ module Appsignal
|
|
9
9
|
HTTP_X_QUEUE_TIME HTTP_X_HEROKU_QUEUE_WAIT_TIME HTTP_X_APPLICATION_START
|
10
10
|
HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE
|
11
11
|
HTTP_CACHE_CONTROL HTTP_CONNECTION HTTP_USER_AGENT HTTP_FROM HTTP_NEGOTIATE
|
12
|
-
HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR).freeze
|
12
|
+
HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR HTTP_CLIENT_IP).freeze
|
13
13
|
|
14
14
|
def self.create(request_id, env)
|
15
15
|
Appsignal.logger.debug("Creating transaction: #{request_id}")
|
@@ -197,8 +197,8 @@ module Appsignal
|
|
197
197
|
|
198
198
|
def sanitize_environment!
|
199
199
|
return unless env
|
200
|
-
|
201
|
-
sanitized_environment[key] =
|
200
|
+
ENV_METHODS.each do |key|
|
201
|
+
sanitized_environment[key] = env[key]
|
202
202
|
end
|
203
203
|
end
|
204
204
|
|
data/lib/appsignal/version.rb
CHANGED
@@ -46,4 +46,28 @@ describe Appsignal::Rack::Instrumentation do
|
|
46
46
|
:path => '/homepage'
|
47
47
|
} }
|
48
48
|
end
|
49
|
+
|
50
|
+
describe "use a custom request class and parameters method" do
|
51
|
+
let(:request_class) do
|
52
|
+
double(
|
53
|
+
new: double(
|
54
|
+
request_method: 'POST',
|
55
|
+
path: '/somewhere',
|
56
|
+
filtered_params: {'param' => 'changed_something'}
|
57
|
+
)
|
58
|
+
)
|
59
|
+
end
|
60
|
+
let(:options) do
|
61
|
+
{ request_class: request_class, params_method: :filtered_params }
|
62
|
+
end
|
63
|
+
let(:middleware) { Appsignal::Rack::Instrumentation.new(app, options) }
|
64
|
+
subject { middleware.raw_payload(env) }
|
65
|
+
|
66
|
+
it { should == {
|
67
|
+
:action => 'POST:/somewhere',
|
68
|
+
:params => {'param' => 'changed_something'},
|
69
|
+
:method => 'POST',
|
70
|
+
:path => '/somewhere'
|
71
|
+
} }
|
72
|
+
end
|
49
73
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-
|
15
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- gemfiles/rails-3.2.gemfile
|
139
139
|
- gemfiles/rails-4.0.gemfile
|
140
140
|
- gemfiles/rails-4.1.gemfile
|
141
|
+
- gemfiles/rails-4.2.gemfile
|
141
142
|
- gemfiles/sinatra.gemfile
|
142
143
|
- lib/appsignal.rb
|
143
144
|
- lib/appsignal/agent.rb
|