zipkin-tracer 0.6.1 → 0.6.2
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 +8 -8
- data/lib/zipkin-tracer/rack/zipkin-tracer.rb +11 -1
- data/lib/zipkin-tracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njc0MTkxM2JmYzI5OTZkMTdlY2JmNWM4ODZjMDI0YTc3ZWM4YmQ1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzE3YmI4ZTBjNDlmMWE2ZDFhMjJmOTQ5NDNkOGRkMDgzMDI2MmUyZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDAwZjFlOTY1YmJiZTIzODRjZGZlODMxNWFmMzczNGU4Yjc1ZDkyM2QzNDFm
|
10
|
+
NDM3N2E3ZDhmNGU0NDRmYjY1ZDFhOTAxMWUyMjgxOGYwMTRhMTQ4NWNiNDJl
|
11
|
+
Y2Y0ZTAyMTk4YTMyMDg0ZTcyMTVkNzk2MjRiNGY0MDFmZmU2ZGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWQxYjRjZmNlMzQzMzdhNDBlNmQ5MDdiNzM5MjJlZjE0MzVkYWExNDcxMzEy
|
14
|
+
NTY0YzgyNTU4ODllNGI1MTZmNzFlNWQ1ZGUwN2Q2NDMwY2MyN2I1ZmU1YzVh
|
15
|
+
MWI3NTgwZmU0ZTVkMDQyMWRjNDc1OWNmMzYwNzE2YWZkZTVmMDQ=
|
@@ -49,7 +49,7 @@ module ZipkinTracer extend self
|
|
49
49
|
|
50
50
|
def call(env)
|
51
51
|
# skip certain requests
|
52
|
-
return @app.call(env) if filtered?(env)
|
52
|
+
return @app.call(env) if filtered?(env) || !routable_request?(env)
|
53
53
|
|
54
54
|
::Trace.default_endpoint = ::Trace.default_endpoint.with_service_name(@config.service_name).with_port(@config.service_port)
|
55
55
|
::Trace.sample_rate=(@config.sample_rate)
|
@@ -59,6 +59,16 @@ module ZipkinTracer extend self
|
|
59
59
|
end
|
60
60
|
|
61
61
|
private
|
62
|
+
|
63
|
+
# If the request is not valid for this service, we do not what to trace it.
|
64
|
+
def routable_request?(env)
|
65
|
+
return true unless defined?(Rails) #If not running on a Rails app, we can't verify if it is invalid
|
66
|
+
Rails.application.routes.recognize_path(env["PATH_INFO"])
|
67
|
+
true
|
68
|
+
rescue ActionController::RoutingError
|
69
|
+
false
|
70
|
+
end
|
71
|
+
|
62
72
|
def annotate(env, status, response_headers, response_body)
|
63
73
|
@config.annotate_plugin.call(env, status, response_headers, response_body) if @config.annotate_plugin
|
64
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipkin-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franklin Hu
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: finagle-thrift
|