console-output-datadog 0.3.0 → 0.4.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: cbd0a0d10792035efd65ad25cf467382856052f8758e484ccf2f8e4a687f63bd
4
- data.tar.gz: ecc7571611f19bf45a12fd9531b0aea9e19b4ebe43f243c6ae876671223be35e
3
+ metadata.gz: 752c83de9079facd51a560278f4e526cf2e3fe50411f70355fc2b22f0ecc156f
4
+ data.tar.gz: 5939cf8ddadd5d55a3946ed6a474dc5a73263f43a344c752e1391b7b7f65f323
5
5
  SHA512:
6
- metadata.gz: 989961531206f30db91d0dd93a0a7e0e6bf2d05352cf2a4ebbddb4b296c921b10a8ca41cc0c51318b13a7b1b2707b46f7b4e7eb735d5d0df451d5ca35d02f34b
7
- data.tar.gz: d0053f7d8ab2de0ce58f580f79df2896b62d2bb8c959236d3667447a4562637ea3615f884ca9ed31e2cc3aae29eefd175be2d186fc138b184f1eaa565e0f1263
6
+ metadata.gz: 2929aa0415b40d4e3ae85d7d48b38a703af6d5ff33a5831a50d7cccc2ce49b1f28d63fb22958cda5ccd163c8143f5f6cb2e95de344a02ae7396b9aaa19741897
7
+ data.tar.gz: '08e3adf7b6aba68af6d4ac230990fc1091e29dc2c89ffef184ab445aed98ccdc6f39937bad309404f7d4dcf5e11e5f4d5d2f43a19fbb493b8100a174ae2404aa'
checksums.yaml.gz.sig CHANGED
Binary file
@@ -6,7 +6,7 @@
6
6
  module Console
7
7
  module Output
8
8
  module Datadog
9
- VERSION = "0.3.0"
9
+ VERSION = "0.4.0"
10
10
  end
11
11
  end
12
12
  end
@@ -27,6 +27,8 @@ require 'ddtrace'
27
27
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
28
  # THE SOFTWARE.
29
29
 
30
+ # frozen_string_literal: true
31
+
30
32
  module Console
31
33
  module Output
32
34
  # The reason why this is a serialized logger rather than an output filter, is because it needs to directly modify the top level of the record.
@@ -41,17 +43,24 @@ module Console
41
43
  if span = trace.active_span
42
44
  options[:dd] = {
43
45
  span_id: span.id.to_s,
44
- trace_id: trace.id.to_s
46
+ trace_id: format_trace_id(trace.id)
45
47
  }
46
48
  else
47
49
  options[:dd] = {
48
- trace_id: trace.id.to_s
50
+ trace_id: format_trace_id(trace.id)
49
51
  }
50
52
  end
51
53
  end
52
54
 
53
55
  @output.call(subject, *arguments, **options, &block)
54
56
  end
57
+
58
+ private
59
+
60
+ def format_trace_id(id)
61
+ # 128-bit tracing is not supported by the Datadog agent, so we need to convert it to 64-bit. We expect that this will be changed in the future.
62
+ ::Datadog::Tracing::Utils::TraceId.to_low_order(id).to_s
63
+ end
55
64
  end
56
65
  end
57
66
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console-output-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -38,7 +38,7 @@ cert_chain:
38
38
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
39
39
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
40
40
  -----END CERTIFICATE-----
41
- date: 2023-08-17 00:00:00.000000000 Z
41
+ date: 2024-02-08 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: console
@@ -91,14 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: '3.0'
94
+ version: '2.7'
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.4.10
101
+ rubygems_version: 3.5.3
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Attach Datadog trace and span details to logs.
metadata.gz.sig CHANGED
Binary file