traces-backend-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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/traces/backend/datadog/interface.rb +10 -16
- data/lib/traces/backend/datadog/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- 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: f3464aff332ac62bf57972e0f9dfbc392eb76590a64adac1f604a9f26b1f5749
|
4
|
+
data.tar.gz: 52e97e8a9beb92d580c1a57c5692a371db4c12a6efaf18d52abb4438ba1eee33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d806071886b1b79447b9a71b1cd046f338dc7ac4bac79c25ffc75f91a6a75444ed049c3b5520f866024ec96e5296c779d8e5631bed88c25114ccd3ae9bedeffe
|
7
|
+
data.tar.gz: 4a059578be07ddb252cc476ee40c5abeca022a4e960140739db7ea4ff8a461ddb8b9084af9f7cd75ad8a3ec9aafafe115c25d34f954fad940c8ec1e75dd408aa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -28,42 +28,36 @@ require_relative 'version'
|
|
28
28
|
module Traces
|
29
29
|
module Backend
|
30
30
|
module Datadog
|
31
|
-
module SpanInterface
|
32
|
-
def []= key, value
|
33
|
-
set_tag(key, value)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
::Datadog::Span.prepend(SpanInterface)
|
38
|
-
|
39
31
|
module Interface
|
40
32
|
def trace(name, attributes: {}, resource: nil, &block)
|
41
|
-
::Datadog.
|
33
|
+
::Datadog::Tracing.trace(name, tags: attributes, resource: resource, &block)
|
42
34
|
end
|
43
35
|
|
44
36
|
def trace_context=(context)
|
45
37
|
if context
|
46
|
-
|
38
|
+
trace_digest = ::Datadog::Tracing::TraceDigest.new(
|
47
39
|
# We force these to be integers otherwise Datadog can fail internally:
|
48
40
|
trace_id: context.trace_id.to_i,
|
49
41
|
span_id: context.parent_id.to_i,
|
50
|
-
|
42
|
+
trace_sampling_priority: context.sampled? ? 1 : 0,
|
51
43
|
)
|
44
|
+
|
45
|
+
::Datadog::Tracing.continue_trace!(trace_digest)
|
52
46
|
end
|
53
47
|
end
|
54
48
|
|
55
|
-
def trace_context
|
56
|
-
return nil unless
|
49
|
+
def trace_context
|
50
|
+
return nil unless trace = ::Datadog::Tracing.active_trace
|
57
51
|
|
58
52
|
flags = 0
|
59
53
|
|
60
|
-
if
|
54
|
+
if trace.sampled?
|
61
55
|
flags |= Context::SAMPLED
|
62
56
|
end
|
63
57
|
|
64
58
|
return Context.new(
|
65
|
-
|
66
|
-
|
59
|
+
trace.id,
|
60
|
+
trace.active_span.span_id,
|
67
61
|
flags,
|
68
62
|
nil,
|
69
63
|
remote: false,
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traces-backend-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -36,36 +36,36 @@ cert_chain:
|
|
36
36
|
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
37
37
|
HiLJ8VOFx6w=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2022-
|
39
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: ddtrace
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: traces
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.6.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.6.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|