sfx-sidekiq-opentracing 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/Gemfile +0 -1
- data/README.md +1 -1
- data/lib/sidekiq/tracer/client_middleware.rb +2 -2
- data/lib/sidekiq/tracer/server_middleware.rb +2 -2
- data/lib/sidekiq/tracer/version.rb +2 -1
- data/sfx-sidekiq-opentracing.gemspec +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 580086e77d1f9c084bf1b383813af102fb9854eb
|
4
|
+
data.tar.gz: ef092c0b061f3f82bcea6a4004b380047a007ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9307fb9100049677856443b1a315f79a934563a1417af53f765020496e799c92b5d079d9d2fa2d61d2899925ae274b3e091da2086ca5f58201a8e5ff6f0401fe
|
7
|
+
data.tar.gz: ed99bf8d092d00cffe56540b0f4d72cb05b9f57ca96056cda2963a60cb45b303e9cac2dc76acdaedc0d84be8dc797b0d0485a20a21c6dde8f8bf846b70e56e0d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.4
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -28,7 +28,7 @@ The gem hooks up into Sidekiq through [middlewares](https://github.com/mperham/s
|
|
28
28
|
To instrument Sidekiq (both sides), you need to specify at least a tracer instance and optionally an active span provider - a proc which returns a current active span. The gem plays nicely with [spanmanager](https://github.com/iaintshine/ruby-spanmanager).
|
29
29
|
|
30
30
|
```ruby
|
31
|
-
require "
|
31
|
+
require "sidekiq-opentracing"
|
32
32
|
|
33
33
|
Sidekiq::Tracer.instrument(tracer: OpenTracing.global_tracer,
|
34
34
|
active_span: -> { OpenTracing.global_tracer.active_span })
|
@@ -4,7 +4,7 @@ module Sidekiq
|
|
4
4
|
class ClientMiddleware
|
5
5
|
include Commons
|
6
6
|
|
7
|
-
attr_reader :tracer, :
|
7
|
+
attr_reader :tracer, :opts
|
8
8
|
|
9
9
|
def initialize(tracer: nil, opts: {})
|
10
10
|
@tracer = tracer
|
@@ -15,7 +15,7 @@ module Sidekiq
|
|
15
15
|
scope = tracer.start_active_span(
|
16
16
|
operation_name(job), tags: tags(job, 'client')
|
17
17
|
)
|
18
|
-
inject(scope.span, job) if
|
18
|
+
inject(scope.span, job) if opts.fetch(:propagate_context, true)
|
19
19
|
yield
|
20
20
|
rescue Exception => e
|
21
21
|
if scope
|
@@ -4,7 +4,7 @@ module Sidekiq
|
|
4
4
|
class ServerMiddleware
|
5
5
|
include Commons
|
6
6
|
|
7
|
-
attr_reader :tracer
|
7
|
+
attr_reader :tracer, :opts
|
8
8
|
|
9
9
|
def initialize(tracer: nil, opts: {})
|
10
10
|
@tracer = tracer
|
@@ -12,7 +12,7 @@ module Sidekiq
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def call(worker, job, queue)
|
15
|
-
parent_span_context = extract(job) if
|
15
|
+
parent_span_context = extract(job) if opts.fetch(:propagate_context, true)
|
16
16
|
|
17
17
|
scope = tracer.start_active_span(
|
18
18
|
operation_name(job),
|
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
21
|
f.match(%r{^(test|spec|features)/})
|
22
22
|
end
|
23
|
-
spec.bindir = "
|
24
|
-
spec.executables = spec.files.grep(%r{^
|
23
|
+
spec.bindir = "bin"
|
24
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
27
|
spec.add_dependency 'opentracing', '~> 0.4'
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfx-sidekiq-opentracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SignalFx
|
8
8
|
- iaintshine
|
9
9
|
autorequire:
|
10
|
-
bindir:
|
10
|
+
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-11-
|
12
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: opentracing
|
@@ -98,7 +98,9 @@ dependencies:
|
|
98
98
|
description: ''
|
99
99
|
email:
|
100
100
|
- signalfx-oss@splunk.com
|
101
|
-
executables:
|
101
|
+
executables:
|
102
|
+
- console
|
103
|
+
- setup
|
102
104
|
extensions: []
|
103
105
|
extra_rdoc_files: []
|
104
106
|
files:
|
@@ -141,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
143
|
version: '0'
|
142
144
|
requirements: []
|
143
145
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.5.2.3
|
145
147
|
signing_key:
|
146
148
|
specification_version: 4
|
147
149
|
summary: OpenTracing instrumentation for Sidekiq.
|