aws-xray 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/aws/xray/rack.rb +6 -2
- data/lib/aws/xray/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e2db1f1c47ffff23ff5b3ba4907d7db96f00ac8
|
4
|
+
data.tar.gz: 53a29948b35d186813d7266ce6c4953d4738ea3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b611a69af5a88fe9aeac5e87cc82b65667b23a465307ad1e48cb1fe69d525675ba7390903548119d5d276db3ead306c0d1802169cb32fd57e02ce3df1c95cbb2
|
7
|
+
data.tar.gz: 1ed14d0833d3634882b1283652a98128784994f7d603047ed625e26869cd9aeb76013db6423ac6eaaa7c6ffde89bd291b207fdd7dd383d1de29546b472b285ec
|
data/README.md
CHANGED
@@ -104,7 +104,7 @@ docker run --link xray:xray --env AWS_XRAY_LOCATION=xray:2000 my-application
|
|
104
104
|
To avoid tracing health checking requests, use "excluded paths" configuration.
|
105
105
|
|
106
106
|
- Environment variable: `AWS_XRAY_EXCLUDED_PATHS=/health_check,/another_check`
|
107
|
-
- Global configuration: `Aws::Xray.config.excluded_paths =
|
107
|
+
- Global configuration: `Aws::Xray.config.excluded_paths = ['/health_check', '/another_check', %r{/token/.+}]`
|
108
108
|
|
109
109
|
### Recording application version
|
110
110
|
aws-xray automatically tries to set application version by reading `app_root/REVISION` file.
|
data/lib/aws/xray/rack.rb
CHANGED
@@ -12,7 +12,7 @@ module Aws
|
|
12
12
|
# - host: e.g. '127.0.0.1'
|
13
13
|
# - port: e.g. 2000
|
14
14
|
# - sock: test purpose.
|
15
|
-
# @param [Array<String>] excluded_paths for health-check endpoints etc...
|
15
|
+
# @param [Array<String,Regexp>] excluded_paths for health-check endpoints etc...
|
16
16
|
def initialize(app, client_options: {}, excluded_paths: [])
|
17
17
|
@app = app
|
18
18
|
@name = Aws::Xray.config.name || raise(MissingNameError)
|
@@ -21,7 +21,7 @@ module Aws
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def call(env)
|
24
|
-
if
|
24
|
+
if excluded_path?(env['PATH_INFO'])
|
25
25
|
@app.call(env)
|
26
26
|
else
|
27
27
|
call_with_tracing(env)
|
@@ -53,6 +53,10 @@ module Aws
|
|
53
53
|
Trace.generate
|
54
54
|
end
|
55
55
|
end
|
56
|
+
|
57
|
+
def excluded_path?(path)
|
58
|
+
!!@excluded_paths.find {|p| p === path }
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
data/lib/aws/xray/version.rb
CHANGED