instrument_all_the_things 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yaml +1 -1
- data/.github/workflows/test.yaml +1 -2
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/Gemfile.lock +20 -10
- data/README.md +1 -1
- data/instrument_all_the_things.gemspec +4 -4
- data/lib/instrument_all_the_things/instrumentors/tracing.rb +1 -2
- data/lib/instrument_all_the_things/method_instrumentor.rb +2 -2
- data/lib/instrument_all_the_things/testing/rspec_matchers.rb +1 -1
- data/lib/instrument_all_the_things/version.rb +1 -1
- data/lib/instrument_all_the_things.rb +1 -7
- data/vendor/cache/ddtrace-1.2.0.gem +0 -0
- data/vendor/cache/debase-ruby_core_source-0.10.16.gem +0 -0
- data/vendor/cache/ffi-1.15.5.gem +0 -0
- data/vendor/cache/json-2.6.2.gem +0 -0
- data/vendor/cache/libddprof-0.6.0.1.0.gem +0 -0
- data/vendor/cache/libddwaf-1.3.0.2.0-x86_64-darwin.gem +0 -0
- data/vendor/cache/libddwaf-1.3.0.2.0.gem +0 -0
- data/vendor/cache/msgpack-1.5.3.gem +0 -0
- data/vendor/cache/rubocop-1.31.2.gem +0 -0
- data/vendor/cache/rubocop-ast-1.19.1.gem +0 -0
- data/vendor/cache/unicode-display_width-2.2.0.gem +0 -0
- metadata +23 -18
- data/vendor/cache/ddtrace-0.54.2.gem +0 -0
- data/vendor/cache/debase-ruby_core_source-0.10.14.gem +0 -0
- data/vendor/cache/msgpack-1.6.0.gem +0 -0
- data/vendor/cache/rubocop-1.30.1.gem +0 -0
- data/vendor/cache/rubocop-ast-1.18.0.gem +0 -0
- data/vendor/cache/unicode-display_width-2.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3a50b9bc4c51ea31e154997452b4690b59f2003a44ff0afa8ccd7fca8cb486f
|
4
|
+
data.tar.gz: 4ab7a859a0e6010506e81048ab5b5b432ed359cd53ad357b3f10b61350770f9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f22311591588a7cf97f9b64441cda02438f4c23ee8a6100a124d8219935971da7753caed4b3ffd311cbddeb530625a9c2973a4772dfef253f0b0b817eab152a6
|
7
|
+
data.tar.gz: 54a7851c25d79b3ffcf596011c63cb101a83ee1fbf00d2f2acf6f49f5145d2eb67c6299b1c0b7c6ad60ef7d2bc99be64c0c515d2a6ed801c7443297c71c6847f
|
data/.github/workflows/lint.yaml
CHANGED
data/.github/workflows/test.yaml
CHANGED
@@ -13,14 +13,13 @@ jobs:
|
|
13
13
|
- 3.1.2
|
14
14
|
- 3.0.4
|
15
15
|
- 2.7.6
|
16
|
-
- 2.6.10
|
17
16
|
steps:
|
18
17
|
- uses: actions/checkout@v2
|
19
18
|
- uses: ruby/setup-ruby@v1
|
20
19
|
with:
|
21
20
|
ruby-version: ${{ matrix.ruby }}
|
22
21
|
bundler-cache: true
|
23
|
-
cache-version:
|
22
|
+
cache-version: ${{ matrix.ruby }}-0
|
24
23
|
- name: Run RSpec
|
25
24
|
env:
|
26
25
|
CI: true
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.2
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
instrument_all_the_things (
|
5
|
-
ddtrace (
|
6
|
-
dogstatsd-ruby
|
4
|
+
instrument_all_the_things (2.0.0)
|
5
|
+
ddtrace (~> 1.2.0)
|
6
|
+
dogstatsd-ruby (~> 5.5.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -11,15 +11,24 @@ GEM
|
|
11
11
|
ast (2.4.2)
|
12
12
|
benchmark-ips (2.10.0)
|
13
13
|
coderay (1.1.3)
|
14
|
-
ddtrace (
|
15
|
-
debase-ruby_core_source (
|
14
|
+
ddtrace (1.2.0)
|
15
|
+
debase-ruby_core_source (= 0.10.16)
|
16
|
+
libddprof (~> 0.6.0.1.0)
|
17
|
+
libddwaf (~> 1.3.0.2.0)
|
16
18
|
msgpack
|
17
|
-
debase-ruby_core_source (0.10.
|
19
|
+
debase-ruby_core_source (0.10.16)
|
18
20
|
diff-lcs (1.5.0)
|
19
21
|
docile (1.4.0)
|
20
22
|
dogstatsd-ruby (5.5.0)
|
23
|
+
ffi (1.15.5)
|
24
|
+
json (2.6.2)
|
25
|
+
libddprof (0.6.0.1.0)
|
26
|
+
libddwaf (1.3.0.2.0)
|
27
|
+
ffi (~> 1.0)
|
28
|
+
libddwaf (1.3.0.2.0-x86_64-darwin)
|
29
|
+
ffi (~> 1.0)
|
21
30
|
method_source (1.0.0)
|
22
|
-
msgpack (1.
|
31
|
+
msgpack (1.5.3)
|
23
32
|
parallel (1.22.1)
|
24
33
|
parser (3.1.2.0)
|
25
34
|
ast (~> 2.4.1)
|
@@ -43,7 +52,8 @@ GEM
|
|
43
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
53
|
rspec-support (~> 3.11.0)
|
45
54
|
rspec-support (3.11.0)
|
46
|
-
rubocop (1.
|
55
|
+
rubocop (1.31.2)
|
56
|
+
json (~> 2.3)
|
47
57
|
parallel (~> 1.10)
|
48
58
|
parser (>= 3.1.0.0)
|
49
59
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -52,7 +62,7 @@ GEM
|
|
52
62
|
rubocop-ast (>= 1.18.0, < 2.0)
|
53
63
|
ruby-progressbar (~> 1.7)
|
54
64
|
unicode-display_width (>= 1.4.0, < 3.0)
|
55
|
-
rubocop-ast (1.
|
65
|
+
rubocop-ast (1.19.1)
|
56
66
|
parser (>= 3.1.1.0)
|
57
67
|
ruby-progressbar (1.11.0)
|
58
68
|
simplecov (0.21.2)
|
@@ -61,7 +71,7 @@ GEM
|
|
61
71
|
simplecov_json_formatter (~> 0.1)
|
62
72
|
simplecov-html (0.12.3)
|
63
73
|
simplecov_json_formatter (0.1.4)
|
64
|
-
unicode-display_width (2.
|
74
|
+
unicode-display_width (2.2.0)
|
65
75
|
|
66
76
|
PLATFORMS
|
67
77
|
ruby
|
data/README.md
CHANGED
@@ -129,7 +129,7 @@ require 'instrument_all_the_things/testing/trace_tracker'
|
|
129
129
|
require 'instrument_all_the_things/testing/rspec_matchers'
|
130
130
|
|
131
131
|
Datadog.configure do |c|
|
132
|
-
c.
|
132
|
+
c.tracing.transport_options = proc { |t|
|
133
133
|
t.adapter :test, IATT::Testing::TraceTracker.new
|
134
134
|
}
|
135
135
|
end
|
@@ -23,15 +23,15 @@ Gem::Specification.new do |spec|
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|Gemfile.lock)/}) }
|
27
27
|
end
|
28
28
|
spec.bindir = 'exe'
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ['lib']
|
31
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
31
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
32
32
|
|
33
|
-
spec.add_dependency 'ddtrace', '
|
34
|
-
spec.add_dependency 'dogstatsd-ruby'
|
33
|
+
spec.add_dependency 'ddtrace', '~> 1.2.0'
|
34
|
+
spec.add_dependency 'dogstatsd-ruby', '~> 5.5.0'
|
35
35
|
|
36
36
|
spec.add_development_dependency 'benchmark-ips'
|
37
37
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
@@ -3,7 +3,6 @@
|
|
3
3
|
module InstrumentAllTheThings
|
4
4
|
module Instrumentors
|
5
5
|
DEFAULT_TRACE_OPTIONS = {
|
6
|
-
service: '',
|
7
6
|
span_type: '',
|
8
7
|
tags: {},
|
9
8
|
span_name: 'method.execution',
|
@@ -23,7 +22,7 @@ module InstrumentAllTheThings
|
|
23
22
|
passed_ops[:resource] ||= context.trace_name(klass)
|
24
23
|
passed_ops[:tags] ||= {}
|
25
24
|
|
26
|
-
InstrumentAllTheThings.tracer.trace(span_name, passed_ops) do
|
25
|
+
InstrumentAllTheThings.tracer.trace(span_name, **passed_ops) do
|
27
26
|
next_blk.call(klass, actual_code)
|
28
27
|
end
|
29
28
|
end
|
@@ -15,9 +15,9 @@ module InstrumentAllTheThings
|
|
15
15
|
|
16
16
|
DEFAULT_OPTIONS = {
|
17
17
|
trace: true,
|
18
|
-
gc_stats:
|
18
|
+
gc_stats: true,
|
19
19
|
error_logging: true,
|
20
|
-
execution_counts_and_timing:
|
20
|
+
execution_counts_and_timing: true,
|
21
21
|
}.freeze
|
22
22
|
|
23
23
|
attr_accessor :options, :instrumentor
|
@@ -36,9 +36,7 @@ module InstrumentAllTheThings
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def tracer
|
39
|
-
|
40
|
-
|
41
|
-
@tracer ||= Datadog.tracer
|
39
|
+
Datadog::Tracing
|
42
40
|
end
|
43
41
|
|
44
42
|
%i[
|
@@ -68,10 +66,6 @@ module InstrumentAllTheThings
|
|
68
66
|
tracer&.active_span&.set_tags(to_tracer_tags(tag_name => tag_value))
|
69
67
|
end
|
70
68
|
|
71
|
-
def self.tag_active_root_span(tag_name, tag_value)
|
72
|
-
tracer&.active_span&.set_tags(to_tracer_tags(tag_name => tag_value))
|
73
|
-
end
|
74
|
-
|
75
69
|
def self.to_tracer_tags(hsh, prefix = nil)
|
76
70
|
hsh.each_with_object({}) do |(hash_key, value), acc|
|
77
71
|
key = prefix ? "#{prefix}.#{hash_key}" : hash_key
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instrument_all_the_things
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Malinconico
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ddtrace
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dogstatsd-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.5.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.5.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: benchmark-ips
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,13 +179,18 @@ files:
|
|
179
179
|
- vendor/cache/ast-2.4.2.gem
|
180
180
|
- vendor/cache/benchmark-ips-2.10.0.gem
|
181
181
|
- vendor/cache/coderay-1.1.3.gem
|
182
|
-
- vendor/cache/ddtrace-
|
183
|
-
- vendor/cache/debase-ruby_core_source-0.10.
|
182
|
+
- vendor/cache/ddtrace-1.2.0.gem
|
183
|
+
- vendor/cache/debase-ruby_core_source-0.10.16.gem
|
184
184
|
- vendor/cache/diff-lcs-1.5.0.gem
|
185
185
|
- vendor/cache/docile-1.4.0.gem
|
186
186
|
- vendor/cache/dogstatsd-ruby-5.5.0.gem
|
187
|
+
- vendor/cache/ffi-1.15.5.gem
|
188
|
+
- vendor/cache/json-2.6.2.gem
|
189
|
+
- vendor/cache/libddprof-0.6.0.1.0.gem
|
190
|
+
- vendor/cache/libddwaf-1.3.0.2.0-x86_64-darwin.gem
|
191
|
+
- vendor/cache/libddwaf-1.3.0.2.0.gem
|
187
192
|
- vendor/cache/method_source-1.0.0.gem
|
188
|
-
- vendor/cache/msgpack-1.
|
193
|
+
- vendor/cache/msgpack-1.5.3.gem
|
189
194
|
- vendor/cache/parallel-1.22.1.gem
|
190
195
|
- vendor/cache/parser-3.1.2.0.gem
|
191
196
|
- vendor/cache/pry-0.14.1.gem
|
@@ -198,13 +203,13 @@ files:
|
|
198
203
|
- vendor/cache/rspec-expectations-3.11.0.gem
|
199
204
|
- vendor/cache/rspec-mocks-3.11.1.gem
|
200
205
|
- vendor/cache/rspec-support-3.11.0.gem
|
201
|
-
- vendor/cache/rubocop-1.
|
202
|
-
- vendor/cache/rubocop-ast-1.
|
206
|
+
- vendor/cache/rubocop-1.31.2.gem
|
207
|
+
- vendor/cache/rubocop-ast-1.19.1.gem
|
203
208
|
- vendor/cache/ruby-progressbar-1.11.0.gem
|
204
209
|
- vendor/cache/simplecov-0.21.2.gem
|
205
210
|
- vendor/cache/simplecov-html-0.12.3.gem
|
206
211
|
- vendor/cache/simplecov_json_formatter-0.1.4.gem
|
207
|
-
- vendor/cache/unicode-display_width-2.
|
212
|
+
- vendor/cache/unicode-display_width-2.2.0.gem
|
208
213
|
homepage: https://github.com/GetTerminus/instrument-all-the-things
|
209
214
|
licenses: []
|
210
215
|
metadata:
|
@@ -219,14 +224,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
224
|
requirements:
|
220
225
|
- - ">="
|
221
226
|
- !ruby/object:Gem::Version
|
222
|
-
version: 2.
|
227
|
+
version: 2.7.0
|
223
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
229
|
requirements:
|
225
230
|
- - ">="
|
226
231
|
- !ruby/object:Gem::Version
|
227
232
|
version: '0'
|
228
233
|
requirements: []
|
229
|
-
rubygems_version: 3.
|
234
|
+
rubygems_version: 3.3.7
|
230
235
|
signing_key:
|
231
236
|
specification_version: 4
|
232
237
|
summary: Make instrumentation with DataDog easy peasy
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|