console-output-datadog 0.3.0 → 0.4.1

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: cbd0a0d10792035efd65ad25cf467382856052f8758e484ccf2f8e4a687f63bd
4
- data.tar.gz: ecc7571611f19bf45a12fd9531b0aea9e19b4ebe43f243c6ae876671223be35e
3
+ metadata.gz: 7c4f4fb6edba0dc5f549bcd3b3c378512db44080e476249ce01302850e0a0100
4
+ data.tar.gz: 7bf94647a348d6def30e87c4c2fa8a389e76373a62b10e267bb9b8caf1dbc789
5
5
  SHA512:
6
- metadata.gz: 989961531206f30db91d0dd93a0a7e0e6bf2d05352cf2a4ebbddb4b296c921b10a8ca41cc0c51318b13a7b1b2707b46f7b4e7eb735d5d0df451d5ca35d02f34b
7
- data.tar.gz: d0053f7d8ab2de0ce58f580f79df2896b62d2bb8c959236d3667447a4562637ea3615f884ca9ed31e2cc3aae29eefd175be2d186fc138b184f1eaa565e0f1263
6
+ metadata.gz: e5594c347929507c63ae5b39f15e6b6432c2a8e338321ef00200c6b34d5f5947841a2c43662012afb78489f81eca121579a3e21569c3d8f348ddd1cfdb4e47c7
7
+ data.tar.gz: 90003c91a2d618d0b2c74cb4c6b1a13d8eccfc402b1ce5ebf38232604f40fd103d422cc54dcccef51747e86a87d347e4e2e8b41bb9fffa58e90bfac41a8bd05c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Console
7
7
  module Output
8
8
  module Datadog
9
- VERSION = "0.3.0"
9
+ VERSION = "0.4.1"
10
10
  end
11
11
  end
12
12
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
  # Copyright, 2022, by Catalino Cuadrado.
6
6
 
7
7
  require 'ddtrace'
@@ -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/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2021-2023, by Samuel Williams.
3
+ Copyright, 2021-2024, by Samuel Williams.
4
4
  Copyright, 2022, by Catalino Cuadrado.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
data/readme.md CHANGED
@@ -24,4 +24,4 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
24
24
 
25
25
  ### Contributor Covenant
26
26
 
27
- This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
27
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
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.1
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
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.0'
63
+ version: '1.10'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '1.0'
70
+ version: '1.10'
71
71
  description:
72
72
  email:
73
73
  executables: []
@@ -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