instrument_all_the_things 1.0.4 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8233c84f173a53f91f896e019fa3ad70cbf0834cc43b3291c341c633099cc13b
4
- data.tar.gz: 71cb7736c90caa59f66e7666eb20d8b3c0a71510c0e0dd2b740ee6f3397174d0
3
+ metadata.gz: f01d0f55884f47cb265247957c24e7fbbb8f0f37635cb914d55c91f79ec78c98
4
+ data.tar.gz: 34a0f3a4a11a52f91514eaaec81e630f4791e214cb8e2a80d5a0ecad17b4bb1d
5
5
  SHA512:
6
- metadata.gz: 6614358e22371b877b9b79f63807906dcc08560a8585dcaeb985599ef889ef900c60a911ef15a1554749da0d84f0bcc92c4cffa4bd38b7b8ef5c3d0e8dbd3704
7
- data.tar.gz: 8a19bb27f82820e1bb8695355e6e8761c02e3237e0a33c441831a57969d21a7192c96e1ccf92c35fc008d03f075227d1306583ccdbaea352ea9e2dd6a365a063
6
+ metadata.gz: 0cd9747694b38c9df3c950b0a18d9238fda0ce54b96a8b9e2fc5bfddc4f28c009c37b3328f0937858c78313f118f903c0d7e3243edd21dba070bc2b03d543116
7
+ data.tar.gz: 1111549516d8ce51924392e2a5ea6af7ce799394606cba348bf6a2091dbebf961c3e61c2e0b27281b768fbcccf8ce9eec5492bfc5f489f865e0efab802c8cd62
@@ -11,19 +11,21 @@ module InstrumentAllTheThings
11
11
 
12
12
  TRACE_WRAPPER = proc do |opts, context|
13
13
  opts = if opts == true
14
- DEFAULT_TRACE_OPTIONS
14
+ DEFAULT_TRACE_OPTIONS.dup
15
15
  else
16
16
  DEFAULT_TRACE_OPTIONS.merge(opts)
17
17
  end
18
18
 
19
+ span_name = opts.delete(:span_name)
20
+
19
21
  proc do |klass, next_blk, actual_code|
20
- InstrumentAllTheThings.tracer.trace(
21
- opts[:span_name],
22
- tags: context[:tags] || {},
23
- service: opts[:service],
24
- resource: opts[:resource] || context.trace_name(klass),
25
- span_type: opts[:span_type]
26
- ) { next_blk.call(klass, actual_code) }
22
+ passed_ops = opts.dup
23
+ passed_ops[:resource] ||= context.trace_name(klass)
24
+ passed_ops[:tags] ||= {}
25
+
26
+ InstrumentAllTheThings.tracer.trace(span_name, passed_ops) do
27
+ next_blk.call(klass, actual_code)
28
+ end
27
29
  end
28
30
  end
29
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InstrumentAllTheThings
4
- VERSION = '1.0.4'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instrument_all_the_things
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.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: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ddtrace
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.0.1
223
+ rubygems_version: 3.0.6
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: Make instrumentation with DataDog easy peasy