rack-tracer 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/tracer.rb +3 -2
- data/rack-tracer.gemspec +1 -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: 86a3c63d2d6db8aec7973f1cb60369d557b6b9ab
|
4
|
+
data.tar.gz: 37bf5f4419bf129fe3209dd201569ff287d6fff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c08bb82015ccd64d96048f380736ee1d4b09014c17c83e03b72ff93be014efa5847dd2987dce4c339a0241db77f69dbe0f75dbe462a4db46facacb9b2cc7f423
|
7
|
+
data.tar.gz: 53de4aa41e736128324fe05050f71d0473e546313c4fdfabfc168cd82891db182faacb2aa0d581056bb7c5595b4b0b13c3e528813064f30dfa73ed13cd06f48a
|
data/lib/rack/tracer.rb
CHANGED
@@ -13,17 +13,18 @@ module Rack
|
|
13
13
|
# @param on_start_span [Proc, nil] A callback evaluated after a new span is created.
|
14
14
|
# @param errors [Array<Class>] An array of error classes to be captured by the tracer
|
15
15
|
# as errors. Errors are **not** muted by the middleware, they're re-raised afterwards.
|
16
|
-
def initialize(app, tracer: OpenTracing.global_tracer, on_start_span: nil, errors: [StandardError])
|
16
|
+
def initialize(app, tracer: OpenTracing.global_tracer, on_start_span: nil, trust_incoming_span: true, errors: [StandardError])
|
17
17
|
@app = app
|
18
18
|
@tracer = tracer
|
19
19
|
@on_start_span = on_start_span
|
20
|
+
@trust_incoming_span = trust_incoming_span
|
20
21
|
@errors = errors
|
21
22
|
end
|
22
23
|
|
23
24
|
def call(env)
|
24
25
|
method = env[REQUEST_METHOD]
|
25
26
|
|
26
|
-
context = @tracer.extract(OpenTracing::FORMAT_RACK, env)
|
27
|
+
context = @tracer.extract(OpenTracing::FORMAT_RACK, env) if @trust_incoming_span
|
27
28
|
span = @tracer.start_span(method,
|
28
29
|
child_of: context,
|
29
30
|
tags: {
|
data/rack-tracer.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|