sidekiq-instrumentation 1.2.0 → 1.2.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 +4 -1
- data/Gemfile.lock +2 -2
- data/lib/sidekiq/tracer/server_middleware.rb +15 -17
- data/lib/sidekiq/tracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15a4684ee4a4994dc8a76c0e7d0905dd498a06a58f619066ceb0ff089d3df379
|
4
|
+
data.tar.gz: 1fee9c0892325630863049961ce5f4e0f1c00a934d6f23e0ccdf34cc5cd16b4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d68879b7e44765920ec54f006d6aa2bc8222f2de00080dacbace7306f33f32ccc15326b1a6813973109ce5db81b46128471fb5879aeac0011a5a3b2b8c3df21
|
7
|
+
data.tar.gz: 6036c4aac84429b921a2003c61d0076eb5775efbb67bd07fb1c7d0a048e8aa78e63529d38e92aa82aca1a77dd9d5655ec3609f54c0719c8285fd4aef171f872f
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
|
2
2
|
Changelog
|
3
3
|
=========
|
4
|
+
## 1.2.1 07/09/2020
|
5
|
+
* Ensure child spans are nested under the root Sidekiq span in the trace
|
6
|
+
|
4
7
|
## 1.2.0 05/28/2020
|
5
8
|
* Ignore active scope in consumers
|
6
9
|
|
7
10
|
## 1.1.0 05/27/2020
|
8
11
|
* Set up build pipeline with circleci and gem-publisher
|
9
12
|
* Fixed linting issues
|
10
|
-
* Renamed gem to `sidekiq-instrumentation`
|
13
|
+
* Renamed gem to `sidekiq-instrumentation`
|
data/Gemfile.lock
CHANGED
@@ -12,29 +12,27 @@ module Sidekiq
|
|
12
12
|
@active_span = active_span
|
13
13
|
end
|
14
14
|
|
15
|
+
# rubocop:disable Metrics/MethodLength
|
15
16
|
def call(_worker, job, _queue)
|
16
|
-
span = build_span(job)
|
17
|
-
|
18
|
-
yield
|
19
|
-
rescue StandardError => e
|
20
|
-
tag_errors(span, e) if span
|
21
|
-
raise
|
22
|
-
ensure
|
23
|
-
span&.finish
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def build_span(job)
|
29
17
|
parent_span_context = extract(job)
|
30
18
|
|
31
19
|
follows_from = OpenTracing::Reference.follows_from(parent_span_context)
|
32
20
|
|
33
|
-
tracer.
|
34
|
-
|
35
|
-
|
36
|
-
|
21
|
+
tracer.start_active_span(operation_name(job),
|
22
|
+
references: [follows_from],
|
23
|
+
ignore_active_scope: true,
|
24
|
+
tags: tags(job, "consumer")) do |scope|
|
25
|
+
begin
|
26
|
+
yield
|
27
|
+
rescue StandardError => e
|
28
|
+
tag_errors(scope.span, e) if scope.span
|
29
|
+
raise
|
30
|
+
end
|
31
|
+
end
|
37
32
|
end
|
33
|
+
# rubocop:enable Metrics/MethodLength
|
34
|
+
|
35
|
+
private
|
38
36
|
|
39
37
|
def tag_errors(span, error)
|
40
38
|
span.set_tag("error", true)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iaintshine
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: opentracing
|