instrument_all_the_things 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3a50b9bc4c51ea31e154997452b4690b59f2003a44ff0afa8ccd7fca8cb486f
4
- data.tar.gz: 4ab7a859a0e6010506e81048ab5b5b432ed359cd53ad357b3f10b61350770f9e
3
+ metadata.gz: 128ce1a0db87a3ae766c72e856519dcfa356c6dcb4b71ac0debbbff0d2026a1b
4
+ data.tar.gz: 50845ff64582662567623779a5caa6cc6118c13b4e4cce520656f3c75dcce1a5
5
5
  SHA512:
6
- metadata.gz: f22311591588a7cf97f9b64441cda02438f4c23ee8a6100a124d8219935971da7753caed4b3ffd311cbddeb530625a9c2973a4772dfef253f0b0b817eab152a6
7
- data.tar.gz: 54a7851c25d79b3ffcf596011c63cb101a83ee1fbf00d2f2acf6f49f5145d2eb67c6299b1c0b7c6ad60ef7d2bc99be64c0c515d2a6ed801c7443297c71c6847f
6
+ metadata.gz: 02a41d1ceb496c3ed1e2f62c278831fde669388d33214ae39abfff6d7ef52c93831c08610d7aa33456dbede44af846213e2a7deffdce8345685aae755012b525
7
+ data.tar.gz: 517a4cd139e4af87dc76cb9daa409c1f097345671d5cb1656bb878fc6a3e81fbfafd58e40d7df85620194172558c8d82a965444905b9ee287d3ebd63239c8247
data/.rubocop.yml CHANGED
@@ -8,6 +8,7 @@ AllCops:
8
8
  - vendor/**/*
9
9
  - bin/*
10
10
  - Guardfile
11
+ - lib/instrument_all_the_things/thread.rb
11
12
 
12
13
  Naming/AccessorMethodName:
13
14
  Exclude:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- instrument_all_the_things (2.0.0)
4
+ instrument_all_the_things (2.0.1)
5
5
  ddtrace (~> 1.2.0)
6
6
  dogstatsd-ruby (~> 5.5.0)
7
7
 
@@ -28,7 +28,7 @@ GEM
28
28
  libddwaf (1.3.0.2.0-x86_64-darwin)
29
29
  ffi (~> 1.0)
30
30
  method_source (1.0.0)
31
- msgpack (1.5.3)
31
+ msgpack (1.5.4)
32
32
  parallel (1.22.1)
33
33
  parser (3.1.2.0)
34
34
  ast (~> 2.4.1)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ddtrace'
4
+
5
+ # https://github.com/DataDog/dd-trace-rb/blob/master/docs/UpgradeGuide.md#between-threads
6
+ class Thread
7
+ def self.new_traced
8
+ trace = Datadog::Tracing.active_trace
9
+ trace_digest = trace.to_digest
10
+
11
+ Thread.new do |*args|
12
+ # Inherits trace properties from the trace digest
13
+ Datadog::Tracing.trace(trace.name, continue_from: trace_digest) do |_span, trace|
14
+ trace.id == trace_digest.trace_id
15
+ yield(*args)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InstrumentAllTheThings
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
@@ -6,6 +6,7 @@ require 'instrument_all_the_things/version'
6
6
 
7
7
  require_relative './instrument_all_the_things/helpers'
8
8
  require_relative './instrument_all_the_things/clients/stat_reporter/datadog'
9
+ require_relative './instrument_all_the_things/thread'
9
10
 
10
11
  module InstrumentAllTheThings
11
12
  class Error < StandardError; end
Binary file
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Malinconico
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-21 00:00:00.000000000 Z
11
+ date: 2022-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ddtrace
@@ -174,6 +174,7 @@ files:
174
174
  - lib/instrument_all_the_things/testing/rspec_matchers.rb
175
175
  - lib/instrument_all_the_things/testing/stat_tracker.rb
176
176
  - lib/instrument_all_the_things/testing/trace_tracker.rb
177
+ - lib/instrument_all_the_things/thread.rb
177
178
  - lib/instrument_all_the_things/version.rb
178
179
  - logo.jpg
179
180
  - vendor/cache/ast-2.4.2.gem
@@ -190,7 +191,7 @@ files:
190
191
  - vendor/cache/libddwaf-1.3.0.2.0-x86_64-darwin.gem
191
192
  - vendor/cache/libddwaf-1.3.0.2.0.gem
192
193
  - vendor/cache/method_source-1.0.0.gem
193
- - vendor/cache/msgpack-1.5.3.gem
194
+ - vendor/cache/msgpack-1.5.4.gem
194
195
  - vendor/cache/parallel-1.22.1.gem
195
196
  - vendor/cache/parser-3.1.2.0.gem
196
197
  - vendor/cache/pry-0.14.1.gem
@@ -231,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
232
  - !ruby/object:Gem::Version
232
233
  version: '0'
233
234
  requirements: []
234
- rubygems_version: 3.3.7
235
+ rubygems_version: 3.3.12
235
236
  signing_key:
236
237
  specification_version: 4
237
238
  summary: Make instrumentation with DataDog easy peasy
Binary file