console-output-datadog 0.1.0 → 0.2.0

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: 1ce960c15e28f5732455455dce98f72e88972c29eef3a4cef4840903721ea9f8
4
- data.tar.gz: 939cf4f7998b98e7bf45ace36240bad4246b9f3f826abdafeacde0d72ac1e8f0
3
+ metadata.gz: 0f623a02cd15b006a1d67111c930446ec4a826b6e9df723179fa27d08c6f1110
4
+ data.tar.gz: 54cb79f3b13ac415254764d6392bb65c362a3b1accc8a411aa2153613f75b3a4
5
5
  SHA512:
6
- metadata.gz: a83472126f41578e7cee2fdcb17fab596081803a3466070859fa87954a17e99ddf5953a444039000b464b94d816664c01eaad2615b5b43e4a06bdaf0a3f8cfa6
7
- data.tar.gz: 92122754293598f7521436782922f8c06e2389c41afd6fdcbef3e0abd768f7ddf5c01e48e0aa52073811e8b202199fd662fadb6d7928346e0c5d2572acb3a14d
6
+ metadata.gz: 9d17afd2572607d8af391b72201a35e45ca9cb73016e8bd9b68f8ee769a5e7a52cbd9c562bfa02dc0e725f43334d90e611c51a6cc18235283d777c6b943a36c3
7
+ data.tar.gz: 5f2a00793289821ab54e1849b250d4a9e2fc8d5caa8ac464ec3bd29154cf73a00b974e7e11e8b1dc945cb0090222f8824aaecdfb7224e42cc3f4f5ff23d905ad
checksums.yaml.gz.sig CHANGED
Binary file
@@ -23,7 +23,7 @@
23
23
  module Console
24
24
  module Output
25
25
  module Datadog
26
- VERSION = "0.1.0"
26
+ VERSION = "0.2.0"
27
27
  end
28
28
  end
29
29
  end
@@ -1,3 +1,4 @@
1
+ require 'ddtrace'
1
2
  # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2021, by Samuel G. D. Williams. <http://www.codeotaku.com>
@@ -30,13 +31,13 @@ module Console
30
31
  end
31
32
 
32
33
  def call(subject = nil, *arguments, **options, &block)
33
- if call_context = ::Datadog.tracer.call_context
34
- if trace_id = call_context.trace_id and span_id = call_context.span_id
35
- options[:dd] = {
36
- trace_id: trace_id.to_s,
37
- span_id: span_id.to_s,
38
- }
39
- end
34
+ if trace = ::Datadog::Tracing.active_trace
35
+ span = trace.active_span
36
+
37
+ options[:dd] = {
38
+ span_id: span.id.to_s,
39
+ trace_id: trace.id.to_s
40
+ }
40
41
  end
41
42
 
42
43
  @output.call(subject, *arguments, **options, &block)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console-output-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Catalino Cuadrado
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain:
@@ -36,7 +37,7 @@ cert_chain:
36
37
  RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
38
  HiLJ8VOFx6w=
38
39
  -----END CERTIFICATE-----
39
- date: 2021-11-19 00:00:00.000000000 Z
40
+ date: 2022-06-09 00:00:00.000000000 Z
40
41
  dependencies:
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: console
@@ -56,16 +57,16 @@ dependencies:
56
57
  name: ddtrace
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - ">="
60
+ - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '0'
62
+ version: '1.0'
62
63
  type: :runtime
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - ">="
67
+ - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '0'
69
+ version: '1.0'
69
70
  - !ruby/object:Gem::Dependency
70
71
  name: rspec
71
72
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  requirements: []
111
- rubygems_version: 3.2.22
112
+ rubygems_version: 3.1.6
112
113
  signing_key:
113
114
  specification_version: 4
114
115
  summary: Attach Datadog trace and span details to logs.
metadata.gz.sig CHANGED
Binary file