console-output-datadog 0.4.1 → 0.5.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/console/output/datadog/version.rb +1 -1
- data/lib/console/output/datadog/wrapper.rb +5 -28
- data/lib/console/output/datadog.rb +2 -2
- data/readme.md +14 -4
- data/releases.md +5 -0
- data.tar.gz.sig +0 -0
- metadata +13 -15
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bfe431a1bb0164573a2cddfa925d6f6d928d17b1a5601644d0b77b67d508708
|
4
|
+
data.tar.gz: dde3efec351672932c670e93ecece4dce15b5df2f971085078420e26e139a685
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16aff2f473a674faf5c08a638b844fe0dc164dd72eb74defab6cf0d5bf164ec33488ffd3cf31a93630ae35e01579027687d23a80c6c07bb79bb400ce6e0e5337
|
7
|
+
data.tar.gz: c77bf3c2b6093c2b5c1b5057671ebaa53c9eb15220583a4c2c469ba04bad521648c17bd9fdaec2eb88da27340fc0667528c2841f0e9ebd5f2ebe02ade0ad542d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,34 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
5
5
|
# Copyright, 2022, by Catalino Cuadrado.
|
6
6
|
|
7
|
-
require 'ddtrace'
|
8
|
-
# frozen_string_literal: true
|
9
|
-
|
10
|
-
# Copyright, 2021, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
11
|
-
#
|
12
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
-
# of this software and associated documentation files (the "Software"), to deal
|
14
|
-
# in the Software without restriction, including without limitation the rights
|
15
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
-
# copies of the Software, and to permit persons to whom the Software is
|
17
|
-
# furnished to do so, subject to the following conditions:
|
18
|
-
#
|
19
|
-
# The above copyright notice and this permission notice shall be included in
|
20
|
-
# all copies or substantial portions of the Software.
|
21
|
-
#
|
22
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
28
|
-
# THE SOFTWARE.
|
29
|
-
|
30
|
-
# frozen_string_literal: true
|
31
|
-
|
32
7
|
module Console
|
33
8
|
module Output
|
34
9
|
# 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.
|
@@ -40,6 +15,9 @@ module Console
|
|
40
15
|
|
41
16
|
def call(subject = nil, *arguments, **options, &block)
|
42
17
|
if trace = ::Datadog::Tracing.active_trace
|
18
|
+
# This does a bunch of allocations, so we avoid using this interface:
|
19
|
+
# correlation = ::Datadog::Tracing.correlation
|
20
|
+
|
43
21
|
if span = trace.active_span
|
44
22
|
options[:dd] = {
|
45
23
|
span_id: span.id.to_s,
|
@@ -58,8 +36,7 @@ module Console
|
|
58
36
|
private
|
59
37
|
|
60
38
|
def format_trace_id(id)
|
61
|
-
|
62
|
-
::Datadog::Tracing::Utils::TraceId.to_low_order(id).to_s
|
39
|
+
::Datadog::Tracing::Correlation.format_trace_id(id)
|
63
40
|
end
|
64
41
|
end
|
65
42
|
end
|
@@ -4,12 +4,12 @@
|
|
4
4
|
# Copyright, 2021-2023, by Samuel Williams.
|
5
5
|
|
6
6
|
begin
|
7
|
-
require
|
7
|
+
require "datadog"
|
8
8
|
rescue LoadError
|
9
9
|
# Ignore.
|
10
10
|
end
|
11
11
|
|
12
|
-
require_relative
|
12
|
+
require_relative "datadog/wrapper"
|
13
13
|
|
14
14
|
module Console
|
15
15
|
module Output
|
data/readme.md
CHANGED
@@ -6,7 +6,17 @@ Attach Datadog `trace_id` and `span_id` to log entries.
|
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
9
|
-
Please see the [project documentation](https://socketry.github.io/console-output-datadog).
|
9
|
+
Please see the [project documentation](https://socketry.github.io/console-output-datadog/) for more details.
|
10
|
+
|
11
|
+
- [Getting Started](https://socketry.github.io/console-output-datadog/guides/getting-started/index) - This guide explains how to use `console-output-datadog` for correlating logs.
|
12
|
+
|
13
|
+
## Releases
|
14
|
+
|
15
|
+
Please see the [project releases](https://socketry.github.io/console-output-datadog/releases/index) for all releases.
|
16
|
+
|
17
|
+
### v0.5.0
|
18
|
+
|
19
|
+
- Update to use `datadog` gem.
|
10
20
|
|
11
21
|
## Contributing
|
12
22
|
|
@@ -20,8 +30,8 @@ We welcome contributions to this project.
|
|
20
30
|
|
21
31
|
### Developer Certificate of Origin
|
22
32
|
|
23
|
-
|
33
|
+
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
24
34
|
|
25
|
-
###
|
35
|
+
### Community Guidelines
|
26
36
|
|
27
|
-
This project is
|
37
|
+
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
|
data/releases.md
ADDED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console-output-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Catalino Cuadrado
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain:
|
12
11
|
- |
|
@@ -38,7 +37,7 @@ cert_chain:
|
|
38
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
39
|
-----END CERTIFICATE-----
|
41
|
-
date:
|
40
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
42
41
|
dependencies:
|
43
42
|
- !ruby/object:Gem::Dependency
|
44
43
|
name: console
|
@@ -55,21 +54,19 @@ dependencies:
|
|
55
54
|
- !ruby/object:Gem::Version
|
56
55
|
version: '0'
|
57
56
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
57
|
+
name: datadog
|
59
58
|
requirement: !ruby/object:Gem::Requirement
|
60
59
|
requirements:
|
61
|
-
- - "
|
60
|
+
- - ">="
|
62
61
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
62
|
+
version: '0'
|
64
63
|
type: :runtime
|
65
64
|
prerelease: false
|
66
65
|
version_requirements: !ruby/object:Gem::Requirement
|
67
66
|
requirements:
|
68
|
-
- - "
|
67
|
+
- - ">="
|
69
68
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
71
|
-
description:
|
72
|
-
email:
|
69
|
+
version: '0'
|
73
70
|
executables: []
|
74
71
|
extensions: []
|
75
72
|
extra_rdoc_files: []
|
@@ -79,11 +76,13 @@ files:
|
|
79
76
|
- lib/console/output/datadog/wrapper.rb
|
80
77
|
- license.md
|
81
78
|
- readme.md
|
79
|
+
- releases.md
|
82
80
|
homepage: https://github.com/socketry/console-output-datadog
|
83
81
|
licenses:
|
84
82
|
- MIT
|
85
|
-
metadata:
|
86
|
-
|
83
|
+
metadata:
|
84
|
+
documentation_uri: https://socketry.github.io/console-output-datadog/
|
85
|
+
source_code_uri: https://github.com/socketry/console-output-datadog.git
|
87
86
|
rdoc_options: []
|
88
87
|
require_paths:
|
89
88
|
- lib
|
@@ -91,15 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
90
|
requirements:
|
92
91
|
- - ">="
|
93
92
|
- !ruby/object:Gem::Version
|
94
|
-
version: '2
|
93
|
+
version: '3.2'
|
95
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
95
|
requirements:
|
97
96
|
- - ">="
|
98
97
|
- !ruby/object:Gem::Version
|
99
98
|
version: '0'
|
100
99
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
102
|
-
signing_key:
|
100
|
+
rubygems_version: 3.6.7
|
103
101
|
specification_version: 4
|
104
102
|
summary: Attach Datadog trace and span details to logs.
|
105
103
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|