From f6ff8d6ffb519339ecfe49eb0a646c07365077e6 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Thu, 4 Apr 2024 14:57:41 +0300 Subject: [PATCH 01/12] feat(otel): add support for span links --- .../opentelemetry/sdk/span_processor.rb | 17 +++++++++++ spec/datadog/opentelemetry_spec.rb | 30 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index 655facab164..d8ffc9f9c52 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true require_relative 'trace/span' +require_relative 'datadog/tracing/span_link' +require_relative '../../tracing/trace_digest' module Datadog module OpenTelemetry @@ -121,6 +123,21 @@ def span_arguments(span, attributes) kwargs[:tags] = attributes + kwargs[:links] = span.links.each do |link| + dd_link = SpanLink( + attributes=link.attributes, + digest=TraceDigest( + trace_id=link.span_context.trace_id, + span_id=link.span_context.span_id, + trace_flags=link.span_context.traceflags.flags | (1 << 31), + trace_state=link.span_context.trace_state.to_s, + is_remote=link.span_context.is_remote, + ) + ) + dd_link.dropped_attributes = span.total_recorded_links - span.links.size + dd_link + end + [name, kwargs] end diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index b67b4d6a7d0..d3a4375572c 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -54,6 +54,36 @@ expect(span.service).to eq(tracer.default_service) end + context 'with span_links' do + let(:sc1) {OpenTelemetry::Trace::SpanContext.new(trace_id=36893488147419103231, span_id=2)} + let(:sc2) { + OpenTelemetry::Trace::SpanContext.new( + trace_id=1234534, + span_id=67890, + trace_flags=OpenTelemetry::Trace::TraceFlag.new(1), + trace_state=OpenTelemetry::Trace::TraceState.new("otel=blahxd") + ) + } + let(:links) { + [ + OpenTelemetry::Trace::Link.new(sc1, {"key": "val", "1": true}), + OpenTelemetry::Trace::Link.new(sc2, {"key2": "val2", "list": ["1", "a"], "overflow": "a"*(2**20)}), + ] + } + let(:span_options) { { links: links } } + + expect(span.links.size).to eq(2) + + expect(span.links[0].trace_id).to eq(36893488147419103231) + expect(span.links[0].span_id).to eq(2) + + expect(span.links[1].trace_id).to eq(1234534) + expect(span.links[1].span_id).to eq(67890) + expect(span.links[1].trace_flags).to eq(1) + expect(span.links[1].trace_state).to eq("otel=blahxd") + expect(span.links[1].dropped_attributes).to eq(1) + end + context 'with attributes' do let(:span_options) { { attributes: attributes } } From d2e8aabdaff8d606559dc8de116a6c7549c655b4 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Tue, 9 Apr 2024 16:45:37 +0300 Subject: [PATCH 02/12] fix import --- .../opentelemetry/sdk/span_processor.rb | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index d8ffc9f9c52..c3a1a0f72d1 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require_relative 'trace/span' -require_relative 'datadog/tracing/span_link' +require_relative '../../tracing/span_link' require_relative '../../tracing/trace_digest' module Datadog @@ -123,19 +123,21 @@ def span_arguments(span, attributes) kwargs[:tags] = attributes - kwargs[:links] = span.links.each do |link| - dd_link = SpanLink( - attributes=link.attributes, - digest=TraceDigest( - trace_id=link.span_context.trace_id, - span_id=link.span_context.span_id, - trace_flags=link.span_context.traceflags.flags | (1 << 31), - trace_state=link.span_context.trace_state.to_s, - is_remote=link.span_context.is_remote, + unless span.links.nil? + kwargs[:links] = span.links.each do |link| + dd_link = SpanLink( + attributes=link.attributes, + digest=TraceDigest( + trace_id=link.span_context.trace_id, + span_id=link.span_context.span_id, + trace_flags=link.span_context.traceflags.flags, + trace_state=link.span_context.trace_state.to_s, + is_remote=link.span_context.is_remote, + ) ) - ) - dd_link.dropped_attributes = span.total_recorded_links - span.links.size - dd_link + dd_link.dropped_attributes = span.total_recorded_links - span.links.size + dd_link + end end [name, kwargs] From 5c386aba8b040542fa56a5d93a64d1376cb3f064 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Tue, 9 Apr 2024 20:46:23 +0300 Subject: [PATCH 03/12] fix links test --- .../opentelemetry/sdk/span_processor.rb | 32 +++++----- spec/datadog/opentelemetry_spec.rb | 64 ++++++++++--------- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index c3a1a0f72d1..5b6cb7ee879 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -89,6 +89,21 @@ def start_datadog_span(span) datadog_span.set_error([nil, span.status.description]) unless span.status.ok? datadog_span.set_tags(span.attributes) + unless span.links.nil? + datadog_span.links = span.links.each do |link| + Datadog::Tracing::SpanLink.new( + attributes: link.attributes, + digest: Datadog::Tracing::TraceDigest.new( + trace_id: link.span_context.trace_id, + span_id: link.span_context.span_id, + trace_flags: (link.span_context.trace_flags&.sampled? ? 1 : 0), + trace_state: link.span_context.tracestate&.to_s, + span_remote: link.span_context.remote?, + ) + ) + end + end + datadog_span end @@ -123,23 +138,6 @@ def span_arguments(span, attributes) kwargs[:tags] = attributes - unless span.links.nil? - kwargs[:links] = span.links.each do |link| - dd_link = SpanLink( - attributes=link.attributes, - digest=TraceDigest( - trace_id=link.span_context.trace_id, - span_id=link.span_context.span_id, - trace_flags=link.span_context.traceflags.flags, - trace_state=link.span_context.trace_state.to_s, - is_remote=link.span_context.is_remote, - ) - ) - dd_link.dropped_attributes = span.total_recorded_links - span.links.size - dd_link - end - end - [name, kwargs] end diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index d3a4375572c..830e6c257ea 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -54,36 +54,6 @@ expect(span.service).to eq(tracer.default_service) end - context 'with span_links' do - let(:sc1) {OpenTelemetry::Trace::SpanContext.new(trace_id=36893488147419103231, span_id=2)} - let(:sc2) { - OpenTelemetry::Trace::SpanContext.new( - trace_id=1234534, - span_id=67890, - trace_flags=OpenTelemetry::Trace::TraceFlag.new(1), - trace_state=OpenTelemetry::Trace::TraceState.new("otel=blahxd") - ) - } - let(:links) { - [ - OpenTelemetry::Trace::Link.new(sc1, {"key": "val", "1": true}), - OpenTelemetry::Trace::Link.new(sc2, {"key2": "val2", "list": ["1", "a"], "overflow": "a"*(2**20)}), - ] - } - let(:span_options) { { links: links } } - - expect(span.links.size).to eq(2) - - expect(span.links[0].trace_id).to eq(36893488147419103231) - expect(span.links[0].span_id).to eq(2) - - expect(span.links[1].trace_id).to eq(1234534) - expect(span.links[1].span_id).to eq(67890) - expect(span.links[1].trace_flags).to eq(1) - expect(span.links[1].trace_state).to eq("otel=blahxd") - expect(span.links[1].dropped_attributes).to eq(1) - end - context 'with attributes' do let(:span_options) { { attributes: attributes } } @@ -347,6 +317,40 @@ expect(span.end_time).to eq(timestamp) end end + + context 'with span_links' do + let(:sc1) { OpenTelemetry::Trace::SpanContext.new(trace_id: 36893488147419103231, span_id: 2) } + let(:sc2) do + OpenTelemetry::Trace::SpanContext.new( + trace_id: 1234534, + span_id: 67890, + trace_flags: OpenTelemetry::Trace::TraceFlags::SAMPLED, + tracestate: OpenTelemetry::Trace::Tracestate.from_string('otel=blahxd') + ) + end + let(:links) do + [ + OpenTelemetry::Trace::Link.new(sc1, { 'key' => 'val', '1' => true }), + OpenTelemetry::Trace::Link.new(sc2, { 'key2' => 'val2', 'list' => [1, 2], 'overflow' => 'a' * (2**2) }), + ] + end + let(:options) { { links: links } } + + it 'sets span links' do + start_span.finish + expect(span.links.size).to eq(2) + + expect(span.links[0].span_context.trace_id).to eq(sc1.trace_id) + expect(span.links[0].span_context.span_id).to eq(sc1.span_id) + expect(span.links[0].attributes).to eq({ 'key' => 'val', '1' => true }) + + expect(span.links[1].span_context.trace_id).to eq(sc2.trace_id) + expect(span.links[1].span_context.span_id).to eq(sc2.span_id) + expect(span.links[1].span_context.trace_flags).to eq(OpenTelemetry::Trace::TraceFlags::SAMPLED) + expect(span.links[1].span_context.tracestate.to_s).to eq(sc2.tracestate.to_s) + expect(span.links[1].attributes).to eq({ 'key2' => 'val2', 'list' => [1, 2], 'overflow' => 'aaaa' }) + end + end end describe '#start_root_span' do From 1abf37ff4bf971fa588485c3c588325299f9c950 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Mon, 15 Apr 2024 17:20:24 -0400 Subject: [PATCH 04/12] update span operation --- lib/datadog/tracing/span_operation.rb | 17 ++++++----------- sig/datadog/tracing/span_operation.rbs | 4 +++- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index 9c7dab9ab7b..b4b658eded2 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -25,16 +25,8 @@ class SpanOperation # Span attributes # NOTE: In the future, we should drop the me - attr_reader \ - :end_time, - :id, - :name, - :parent_id, - :resource, - :service, - :start_time, - :trace_id, - :type + attr_accessor :links + attr_reader :end_time, :id, :name, :parent_id, :resource, :service, :start_time, :trace_id, :type attr_accessor \ :status @@ -49,7 +41,8 @@ def initialize( start_time: nil, tags: nil, trace_id: nil, - type: nil + type: nil, + links: nil ) # Ensure dynamically created strings are UTF-8 encoded. # @@ -66,6 +59,7 @@ def initialize( @trace_id = trace_id || Tracing::Utils::TraceId.next_id @status = 0 + @links = links # start_time and end_time track wall clock. In Ruby, wall clock # has less accuracy than monotonic clock, so if possible we look to only use wall clock @@ -452,6 +446,7 @@ def build_span status: @status, type: @type, trace_id: @trace_id, + links: @links, service_entry: parent.nil? || (service && parent.service != service) ) end diff --git a/sig/datadog/tracing/span_operation.rbs b/sig/datadog/tracing/span_operation.rbs index 0efb8a43f44..bcbd67064c7 100644 --- a/sig/datadog/tracing/span_operation.rbs +++ b/sig/datadog/tracing/span_operation.rbs @@ -6,6 +6,8 @@ module Datadog include Metadata::Errors prepend Metadata::Analytics + attr_reader links: untyped + attr_reader end_time: untyped attr_reader id: untyped @@ -26,7 +28,7 @@ module Datadog attr_accessor status: untyped - def initialize: (untyped name, ?child_of: untyped?, ?events: untyped?, ?on_error: untyped?, ?parent_id: ::Integer, ?resource: untyped, ?service: untyped?, ?start_time: untyped?, ?tags: untyped?, ?trace_id: untyped?, ?type: untyped?) -> void + def initialize: (untyped name, ?child_of: untyped?, ?events: untyped?, ?on_error: untyped?, ?parent_id: ::Integer, ?resource: untyped, ?service: untyped?, ?start_time: untyped?, ?tags: untyped?, ?trace_id: untyped?, ?type: untyped?, ?links: untyped?) -> void def name=: (untyped name) -> untyped From 30b29a8960400a41bf1cc1b6d3a30a71dfff04c8 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Mon, 15 Apr 2024 17:45:21 -0400 Subject: [PATCH 05/12] use map instead of each to return dd link objects --- .../opentelemetry/sdk/span_processor.rb | 2 +- lib/datadog/tracing/span_operation.rb | 2 +- spec/datadog/opentelemetry_spec.rb | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index 5b6cb7ee879..c031b94c89f 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -90,7 +90,7 @@ def start_datadog_span(span) datadog_span.set_tags(span.attributes) unless span.links.nil? - datadog_span.links = span.links.each do |link| + datadog_span.links = span.links.map do |link| Datadog::Tracing::SpanLink.new( attributes: link.attributes, digest: Datadog::Tracing::TraceDigest.new( diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index b4b658eded2..0c76480ff5d 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -59,7 +59,7 @@ def initialize( @trace_id = trace_id || Tracing::Utils::TraceId.next_id @status = 0 - @links = links + @links = links or [] # start_time and end_time track wall clock. In Ruby, wall clock # has less accuracy than monotonic clock, so if possible we look to only use wall clock diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index 830e6c257ea..25850305092 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -331,7 +331,7 @@ let(:links) do [ OpenTelemetry::Trace::Link.new(sc1, { 'key' => 'val', '1' => true }), - OpenTelemetry::Trace::Link.new(sc2, { 'key2' => 'val2', 'list' => [1, 2], 'overflow' => 'a' * (2**2) }), + OpenTelemetry::Trace::Link.new(sc2, { 'key2' => true, 'list' => [1, 2] }), ] end let(:options) { { links: links } } @@ -340,15 +340,17 @@ start_span.finish expect(span.links.size).to eq(2) - expect(span.links[0].span_context.trace_id).to eq(sc1.trace_id) - expect(span.links[0].span_context.span_id).to eq(sc1.span_id) + expect(span.links[0].trace_id).to eq(sc1.trace_id) + expect(span.links[0].span_id).to eq(sc1.span_id) + expect(span.links[0].trace_flags).to eq(0) + expect(span.links[0].trace_state).to eq('') expect(span.links[0].attributes).to eq({ 'key' => 'val', '1' => true }) - expect(span.links[1].span_context.trace_id).to eq(sc2.trace_id) - expect(span.links[1].span_context.span_id).to eq(sc2.span_id) - expect(span.links[1].span_context.trace_flags).to eq(OpenTelemetry::Trace::TraceFlags::SAMPLED) - expect(span.links[1].span_context.tracestate.to_s).to eq(sc2.tracestate.to_s) - expect(span.links[1].attributes).to eq({ 'key2' => 'val2', 'list' => [1, 2], 'overflow' => 'aaaa' }) + expect(span.links[1].trace_id).to eq(sc2.trace_id) + expect(span.links[1].span_id).to eq(sc2.span_id) + expect(span.links[1].trace_flags).to eq(1) + expect(span.links[1].trace_state).to eq(sc2.tracestate.to_s) + expect(span.links[1].attributes).to eq({ 'key2' => true, 'list' => [1, 2] }) end end end From 374d5e9b1d1202ae3ea92fdacb412aa18dea196f Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Tue, 16 Apr 2024 09:52:19 -0400 Subject: [PATCH 06/12] add span op test --- lib/datadog/tracing/span_operation.rb | 2 +- spec/datadog/tracing/span_operation_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index 0c76480ff5d..8b9bb7d0391 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -59,7 +59,7 @@ def initialize( @trace_id = trace_id || Tracing::Utils::TraceId.next_id @status = 0 - @links = links or [] + @links = links || [] # start_time and end_time track wall clock. In Ruby, wall clock # has less accuracy than monotonic clock, so if possible we look to only use wall clock diff --git a/spec/datadog/tracing/span_operation_spec.rb b/spec/datadog/tracing/span_operation_spec.rb index 0fde9353694..61c422ed5d6 100644 --- a/spec/datadog/tracing/span_operation_spec.rb +++ b/spec/datadog/tracing/span_operation_spec.rb @@ -83,7 +83,8 @@ start_time: nil, status: 0, trace_id: kind_of(Integer), - type: nil + type: nil, + links: [] ) end From 7e9fe1efbdc6c14b9eb14fe004684329cc45baaf Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Fri, 19 Apr 2024 16:07:36 -0400 Subject: [PATCH 07/12] ensure link ids have the correct type --- lib/datadog/opentelemetry/sdk/span_processor.rb | 10 +++++----- spec/datadog/opentelemetry_spec.rb | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index c031b94c89f..a74142738f2 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -92,14 +92,14 @@ def start_datadog_span(span) unless span.links.nil? datadog_span.links = span.links.map do |link| Datadog::Tracing::SpanLink.new( - attributes: link.attributes, - digest: Datadog::Tracing::TraceDigest.new( - trace_id: link.span_context.trace_id, - span_id: link.span_context.span_id, + Datadog::Tracing::TraceDigest.new( + trace_id: link.span_context.trace_id.unpack1('Q'), + span_id: link.span_context.span_id.unpack1('Q'), trace_flags: (link.span_context.trace_flags&.sampled? ? 1 : 0), trace_state: link.span_context.tracestate&.to_s, span_remote: link.span_context.remote?, - ) + ), + attributes: link.attributes ) end end diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index 25850305092..710f6d781a7 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -322,8 +322,8 @@ let(:sc1) { OpenTelemetry::Trace::SpanContext.new(trace_id: 36893488147419103231, span_id: 2) } let(:sc2) do OpenTelemetry::Trace::SpanContext.new( - trace_id: 1234534, - span_id: 67890, + trace_id: [1234534].pack('Q'), + span_id: [67890].pack('Q'), trace_flags: OpenTelemetry::Trace::TraceFlags::SAMPLED, tracestate: OpenTelemetry::Trace::Tracestate.from_string('otel=blahxd') ) From 59e9c5cefe2f11a95c1a6cac54b5dce26d621d3e Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Tue, 23 Apr 2024 03:56:37 +0200 Subject: [PATCH 08/12] fix trace_id packing and types --- lib/datadog/opentelemetry/sdk/span_processor.rb | 6 +++--- spec/datadog/opentelemetry_spec.rb | 17 +++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index a74142738f2..5b50a38b07c 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -92,9 +92,9 @@ def start_datadog_span(span) unless span.links.nil? datadog_span.links = span.links.map do |link| Datadog::Tracing::SpanLink.new( - Datadog::Tracing::TraceDigest.new( - trace_id: link.span_context.trace_id.unpack1('Q'), - span_id: link.span_context.span_id.unpack1('Q'), + digest: Datadog::Tracing::TraceDigest.new( + trace_id: link.span_context.hex_trace_id.to_i(16), + span_id: link.span_context.hex_span_id.to_i(16), trace_flags: (link.span_context.trace_flags&.sampled? ? 1 : 0), trace_state: link.span_context.tracestate&.to_s, span_remote: link.span_context.remote?, diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index 710f6d781a7..b9c83430848 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -319,10 +319,15 @@ end context 'with span_links' do - let(:sc1) { OpenTelemetry::Trace::SpanContext.new(trace_id: 36893488147419103231, span_id: 2) } + let(:sc1) do + OpenTelemetry::Trace::SpanContext.new( + trace_id: ['000000000000006d5b953ca4d9c834ab'].pack('H*'), + span_id: [67893423423].pack('Q') + ) + end let(:sc2) do OpenTelemetry::Trace::SpanContext.new( - trace_id: [1234534].pack('Q'), + trace_id: ['12d666'].pack('H*'), span_id: [67890].pack('Q'), trace_flags: OpenTelemetry::Trace::TraceFlags::SAMPLED, tracestate: OpenTelemetry::Trace::Tracestate.from_string('otel=blahxd') @@ -340,14 +345,14 @@ start_span.finish expect(span.links.size).to eq(2) - expect(span.links[0].trace_id).to eq(sc1.trace_id) - expect(span.links[0].span_id).to eq(sc1.span_id) + expect(span.links[0].trace_id).to eq(2017294351542048535723) + expect(span.links[0].span_id).to eq(67893423423) expect(span.links[0].trace_flags).to eq(0) expect(span.links[0].trace_state).to eq('') expect(span.links[0].attributes).to eq({ 'key' => 'val', '1' => true }) - expect(span.links[1].trace_id).to eq(sc2.trace_id) - expect(span.links[1].span_id).to eq(sc2.span_id) + expect(span.links[1].trace_id).to eq(1234534) + expect(span.links[1].span_id).to eq(67890) expect(span.links[1].trace_flags).to eq(1) expect(span.links[1].trace_state).to eq(sc2.tracestate.to_s) expect(span.links[1].attributes).to eq({ 'key2' => true, 'list' => [1, 2] }) From da32ee5c0073cefa8700c92203c5bf7ff7db1246 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Wed, 24 Apr 2024 16:21:51 +0200 Subject: [PATCH 09/12] reduce diff Co-authored-by: Marco Costa --- lib/datadog/tracing/span_operation.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index 8b9bb7d0391..3999476f53f 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -25,8 +25,17 @@ class SpanOperation # Span attributes # NOTE: In the future, we should drop the me + attr_reader \ + :end_time, + :id, + :name, + :parent_id, + :resource, + :service, + :start_time, + :trace_id, + :type attr_accessor :links - attr_reader :end_time, :id, :name, :parent_id, :resource, :service, :start_time, :trace_id, :type attr_accessor \ :status From dbca88cc614d9e2bb0ab91de567935f37f9ccd9e Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Thu, 25 Apr 2024 13:03:20 +0200 Subject: [PATCH 10/12] fix tests and address comments --- lib/datadog/tracing/span_operation.rb | 9 ++++----- spec/datadog/opentelemetry_spec.rb | 8 ++++---- spec/datadog/tracing/span_operation_spec.rb | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index 3999476f53f..18e869d16b7 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -35,10 +35,7 @@ class SpanOperation :start_time, :trace_id, :type - attr_accessor :links - - attr_accessor \ - :status + attr_accessor :links, :status def initialize( name, @@ -68,6 +65,7 @@ def initialize( @trace_id = trace_id || Tracing::Utils::TraceId.next_id @status = 0 + # stores array of span links @links = links || [] # start_time and end_time track wall clock. In Ruby, wall clock @@ -261,7 +259,8 @@ def finished? def duration return @duration_end - @duration_start if @duration_start && @duration_end - return @end_time - @start_time if @start_time && @end_time + + @end_time - @start_time if @start_time && @end_time end def set_error(e) diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index b9c83430848..623d5893cc2 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -322,13 +322,13 @@ let(:sc1) do OpenTelemetry::Trace::SpanContext.new( trace_id: ['000000000000006d5b953ca4d9c834ab'].pack('H*'), - span_id: [67893423423].pack('Q') + span_id: ['0000000fcec36d3f'].pack('H*') ) end let(:sc2) do OpenTelemetry::Trace::SpanContext.new( - trace_id: ['12d666'].pack('H*'), - span_id: [67890].pack('Q'), + trace_id: ['0000000000000000000000000012d666'].pack('H*'), + span_id: ['000000000000000a'].pack('H*'), trace_flags: OpenTelemetry::Trace::TraceFlags::SAMPLED, tracestate: OpenTelemetry::Trace::Tracestate.from_string('otel=blahxd') ) @@ -353,7 +353,7 @@ expect(span.links[1].trace_id).to eq(1234534) expect(span.links[1].span_id).to eq(67890) - expect(span.links[1].trace_flags).to eq(1) + expect(span.links[1].trace_flags).to eq(10) expect(span.links[1].trace_state).to eq(sc2.tracestate.to_s) expect(span.links[1].attributes).to eq({ 'key2' => true, 'list' => [1, 2] }) end diff --git a/spec/datadog/tracing/span_operation_spec.rb b/spec/datadog/tracing/span_operation_spec.rb index 61c422ed5d6..eb2f47da1c0 100644 --- a/spec/datadog/tracing/span_operation_spec.rb +++ b/spec/datadog/tracing/span_operation_spec.rb @@ -8,6 +8,8 @@ require 'datadog/tracing/metadata/ext' require 'datadog/tracing/span_operation' +require 'datadog/tracing/span_link' +require 'datadog/tracing/trace_digest' require 'datadog/tracing/span' require 'datadog/tracing/utils' @@ -234,6 +236,25 @@ end end + describe ':links' do + let(:options) { { links: span_links } } + + context 'that is an Array' do + let(:span_links) do + [Datadog::Tracing::SpanLink.new( + digest: Datadog::Tracing::TraceDigest.new(trace_id: 1, span_id: 2), + attributes: { "link.name": 'moon' } + )] + end + it { is_expected.to have_attributes(links: span_links) } + end + + context 'that is nil' do + let(:span_links) { nil } + it { is_expected.to have_attributes(links: []) } + end + end + describe ':start_time' do let(:options) { { start_time: start_time } } let(:start_time) { instance_double(Time) } From 656475e9e27045da88876d0f33abae9304ad8cf0 Mon Sep 17 00:00:00 2001 From: marcotc Date: Wed, 1 May 2024 18:36:55 +0000 Subject: [PATCH 11/12] Update gemfiles/* --- gemfiles/ruby_2.5_sinatra_2.gemfile | 42 +++++ gemfiles/ruby_2.5_sinatra_2.gemfile.lock | 172 ++++++++++++++++++ gemfiles/ruby_2.6_sinatra_2.gemfile | 46 +++++ gemfiles/ruby_2.6_sinatra_2.gemfile.lock | 211 ++++++++++++++++++++++ gemfiles/ruby_2.6_sinatra_3.gemfile | 46 +++++ gemfiles/ruby_2.6_sinatra_3.gemfile.lock | 213 +++++++++++++++++++++++ gemfiles/ruby_2.7_sinatra_2.gemfile.lock | 5 + gemfiles/ruby_2.7_sinatra_3.gemfile.lock | 5 + gemfiles/ruby_3.0_sinatra_2.gemfile.lock | 5 + gemfiles/ruby_3.0_sinatra_3.gemfile.lock | 5 + gemfiles/ruby_3.0_sinatra_4.gemfile.lock | 5 + gemfiles/ruby_3.1_sinatra_2.gemfile.lock | 5 + gemfiles/ruby_3.1_sinatra_3.gemfile.lock | 5 + gemfiles/ruby_3.1_sinatra_4.gemfile.lock | 5 + gemfiles/ruby_3.2_sinatra_2.gemfile.lock | 5 + gemfiles/ruby_3.2_sinatra_3.gemfile.lock | 5 + gemfiles/ruby_3.2_sinatra_4.gemfile.lock | 5 + gemfiles/ruby_3.3_sinatra_2.gemfile.lock | 5 + gemfiles/ruby_3.3_sinatra_3.gemfile.lock | 5 + gemfiles/ruby_3.3_sinatra_4.gemfile.lock | 5 + 20 files changed, 800 insertions(+) create mode 100644 gemfiles/ruby_2.5_sinatra_2.gemfile create mode 100644 gemfiles/ruby_2.5_sinatra_2.gemfile.lock create mode 100644 gemfiles/ruby_2.6_sinatra_2.gemfile create mode 100644 gemfiles/ruby_2.6_sinatra_2.gemfile.lock create mode 100644 gemfiles/ruby_2.6_sinatra_3.gemfile create mode 100644 gemfiles/ruby_2.6_sinatra_3.gemfile.lock diff --git a/gemfiles/ruby_2.5_sinatra_2.gemfile b/gemfiles/ruby_2.5_sinatra_2.gemfile new file mode 100644 index 00000000000..7a5eaee80b8 --- /dev/null +++ b/gemfiles/ruby_2.5_sinatra_2.gemfile @@ -0,0 +1,42 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal", "~> 2.4.0" +gem "benchmark-ips", "~> 2.8" +gem "benchmark-memory", "< 0.2" +gem "builder" +gem "climate_control", "~> 0.2.0" +gem "concurrent-ruby" +gem "extlz4", "~> 0.3", ">= 0.3.3" +gem "json-schema", "< 3" +gem "memory_profiler", "~> 0.9" +gem "os", "~> 1.1" +gem "pimpmychangelog", ">= 0.1.2" +gem "pry" +gem "pry-nav" +gem "pry-stack_explorer" +gem "rake", ">= 10.5" +gem "rake-compiler", "~> 1.1", ">= 1.1.1" +gem "redcarpet", "~> 3.4" +gem "rspec", "~> 3.12" +gem "rspec-collection_matchers", "~> 1.1" +gem "rspec-wait", "~> 0" +gem "rspec_junit_formatter", ">= 0.5.1" +gem "rspec_n", "~> 1.3" +gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" +gem "simplecov-cobertura", "~> 2.1.0" +gem "warning", "~> 1" +gem "webmock", ">= 3.10.0" +gem "yard", "~> 0.9" +gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" +gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] +gem "sinatra", "~> 2" +gem "rack-contrib" +gem "rack-test" + +group :check do + +end + +gemspec path: "../" diff --git a/gemfiles/ruby_2.5_sinatra_2.gemfile.lock b/gemfiles/ruby_2.5_sinatra_2.gemfile.lock new file mode 100644 index 00000000000..5c3c7ae60a0 --- /dev/null +++ b/gemfiles/ruby_2.5_sinatra_2.gemfile.lock @@ -0,0 +1,172 @@ +GIT + remote: https://github.com/DataDog/simplecov + revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + specs: + simplecov (0.21.2) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + +PATH + remote: .. + specs: + datadog (2.0.0.beta2) + debase-ruby_core_source (= 3.3.1) + libdatadog (~> 7.0.0.1.0) + libddwaf (~> 1.14.0.0.0) + msgpack + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.4.1) + bundler + rake + thor (>= 0.14.0) + benchmark-ips (2.13.0) + benchmark-memory (0.1.2) + memory_profiler (~> 0.9) + bigdecimal (3.1.7) + binding_of_caller (0.8.0) + debug_inspector (>= 0.0.1) + builder (3.2.4) + climate_control (0.2.0) + coderay (1.1.3) + colorize (0.8.1) + concurrent-ruby (1.2.3) + crack (1.0.0) + bigdecimal + rexml + cri (2.15.11) + debase-ruby_core_source (3.3.1) + debug_inspector (1.2.0) + diff-lcs (1.5.1) + docile (1.4.0) + dogstatsd-ruby (5.6.1) + extlz4 (0.3.4) + ffi (1.16.3) + google-protobuf (3.19.1) + google-protobuf (3.19.1-x86_64-linux) + hashdiff (1.1.0) + json-schema (2.8.1) + addressable (>= 2.4) + libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) + libddwaf (1.14.0.0.0-aarch64-linux) + ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) + memory_profiler (0.9.14) + method_source (1.1.0) + msgpack (1.7.2) + mustermann (2.0.2) + ruby2_keywords (~> 0.0.1) + os (1.1.4) + pimpmychangelog (0.1.3) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-nav (1.0.0) + pry (>= 0.9.10, < 0.15) + pry-stack_explorer (0.4.13) + binding_of_caller (~> 0.7) + pry (~> 0.13) + public_suffix (4.0.7) + rack (2.2.9) + rack-contrib (2.4.0) + rack (< 4) + rack-protection (2.2.4) + rack + rack-test (2.1.0) + rack (>= 1.3) + rake (13.2.1) + rake-compiler (1.2.7) + rake + redcarpet (3.6.0) + rexml (3.2.6) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-collection_matchers (1.2.1) + rspec-expectations (>= 2.99.0.beta1) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rspec-wait (0.0.10) + rspec (>= 3.0) + rspec_junit_formatter (0.6.0) + rspec-core (>= 2, < 4, != 2.12.0) + rspec_n (1.3.0) + colorize (~> 0.8.0) + cri (~> 2.15.3) + ruby2_keywords (0.0.5) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sinatra (2.2.4) + mustermann (~> 2.0) + rack (~> 2.2) + rack-protection (= 2.2.4) + tilt (~> 2.0) + thor (1.2.2) + tilt (2.3.0) + warning (1.3.0) + webmock (3.23.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + yard (0.9.36) + +PLATFORMS + aarch64-linux + x86_64-linux + +DEPENDENCIES + appraisal (~> 2.4.0) + benchmark-ips (~> 2.8) + benchmark-memory (< 0.2) + builder + climate_control (~> 0.2.0) + concurrent-ruby + datadog! + dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) + extlz4 (~> 0.3, >= 0.3.3) + google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) + json-schema (< 3) + memory_profiler (~> 0.9) + os (~> 1.1) + pimpmychangelog (>= 0.1.2) + pry + pry-nav + pry-stack_explorer + rack-contrib + rack-test + rake (>= 10.5) + rake-compiler (~> 1.1, >= 1.1.1) + redcarpet (~> 3.4) + rspec (~> 3.12) + rspec-collection_matchers (~> 1.1) + rspec-wait (~> 0) + rspec_junit_formatter (>= 0.5.1) + rspec_n (~> 1.3) + simplecov! + simplecov-cobertura (~> 2.1.0) + sinatra (~> 2) + warning (~> 1) + webmock (>= 3.10.0) + yard (~> 0.9) + +BUNDLED WITH + 2.3.27 diff --git a/gemfiles/ruby_2.6_sinatra_2.gemfile b/gemfiles/ruby_2.6_sinatra_2.gemfile new file mode 100644 index 00000000000..5caee35d32e --- /dev/null +++ b/gemfiles/ruby_2.6_sinatra_2.gemfile @@ -0,0 +1,46 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal", "~> 2.4.0" +gem "benchmark-ips", "~> 2.8" +gem "benchmark-memory", "< 0.2" +gem "builder" +gem "climate_control", "~> 0.2.0" +gem "concurrent-ruby" +gem "extlz4", "~> 0.3", ">= 0.3.3" +gem "json-schema", "< 3" +gem "memory_profiler", "~> 0.9" +gem "os", "~> 1.1" +gem "pimpmychangelog", ">= 0.1.2" +gem "pry" +gem "pry-byebug" +gem "pry-stack_explorer" +gem "rake", ">= 10.5" +gem "rake-compiler", "~> 1.1", ">= 1.1.1" +gem "redcarpet", "~> 3.4" +gem "rspec", "~> 3.12" +gem "rspec-collection_matchers", "~> 1.1" +gem "rspec-wait", "~> 0" +gem "rspec_junit_formatter", ">= 0.5.1" +gem "rspec_n", "~> 1.3" +gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" +gem "simplecov-cobertura", "~> 2.1.0" +gem "warning", "~> 1" +gem "webmock", ">= 3.10.0" +gem "yard", "~> 0.9" +gem "rubocop", "~> 1.50.0", require: false +gem "rubocop-packaging", "~> 0.5.2", require: false +gem "rubocop-performance", "~> 1.9", require: false +gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false +gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" +gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] +gem "sinatra", "~> 2" +gem "rack-contrib" +gem "rack-test" + +group :check do + +end + +gemspec path: "../" diff --git a/gemfiles/ruby_2.6_sinatra_2.gemfile.lock b/gemfiles/ruby_2.6_sinatra_2.gemfile.lock new file mode 100644 index 00000000000..5fa13cc6773 --- /dev/null +++ b/gemfiles/ruby_2.6_sinatra_2.gemfile.lock @@ -0,0 +1,211 @@ +GIT + remote: https://github.com/DataDog/simplecov + revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + specs: + simplecov (0.21.2) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + +PATH + remote: .. + specs: + datadog (2.0.0.beta2) + debase-ruby_core_source (= 3.3.1) + libdatadog (~> 7.0.0.1.0) + libddwaf (~> 1.14.0.0.0) + msgpack + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.4.1) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + benchmark-ips (2.13.0) + benchmark-memory (0.1.2) + memory_profiler (~> 0.9) + bigdecimal (3.1.7) + binding_of_caller (1.0.1) + debug_inspector (>= 1.2.0) + builder (3.2.4) + byebug (11.1.3) + climate_control (0.2.0) + coderay (1.1.3) + colorize (0.8.1) + concurrent-ruby (1.2.3) + crack (1.0.0) + bigdecimal + rexml + cri (2.15.11) + debase-ruby_core_source (3.3.1) + debug_inspector (1.2.0) + diff-lcs (1.5.1) + docile (1.4.0) + dogstatsd-ruby (5.6.1) + extlz4 (0.3.4) + ffi (1.16.3) + google-protobuf (3.19.1) + google-protobuf (3.19.1-x86_64-linux) + hashdiff (1.1.0) + json (2.7.2) + json-schema (2.8.1) + addressable (>= 2.4) + libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) + libddwaf (1.14.0.0.0-aarch64-linux) + ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) + memory_profiler (0.9.14) + method_source (1.1.0) + msgpack (1.7.2) + mustermann (2.0.2) + ruby2_keywords (~> 0.0.1) + os (1.1.4) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + pimpmychangelog (0.1.3) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.8.0) + byebug (~> 11.0) + pry (~> 0.10) + pry-stack_explorer (0.6.1) + binding_of_caller (~> 1.0) + pry (~> 0.13) + public_suffix (5.0.5) + racc (1.7.3) + rack (2.2.9) + rack-contrib (2.4.0) + rack (< 4) + rack-protection (2.2.4) + rack + rack-test (2.1.0) + rack (>= 1.3) + rainbow (3.1.1) + rake (13.2.1) + rake-compiler (1.2.7) + rake + redcarpet (3.6.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-collection_matchers (1.2.1) + rspec-expectations (>= 2.99.0.beta1) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rspec-wait (0.0.10) + rspec (>= 3.0) + rspec_junit_formatter (0.6.0) + rspec-core (>= 2, < 4, != 2.12.0) + rspec_n (1.4.0) + colorize (~> 0.8.0) + cri (~> 2.15.3) + rubocop (1.50.2) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.18.0) + rubocop (~> 1.41) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-performance (1.17.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rspec (2.20.0) + rubocop (~> 1.33) + rubocop-capybara (~> 2.17) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sinatra (2.2.4) + mustermann (~> 2.0) + rack (~> 2.2) + rack-protection (= 2.2.4) + tilt (~> 2.0) + thor (1.3.1) + tilt (2.3.0) + unicode-display_width (2.5.0) + warning (1.3.0) + webmock (3.23.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + yard (0.9.36) + +PLATFORMS + aarch64-linux + x86_64-linux + +DEPENDENCIES + appraisal (~> 2.4.0) + benchmark-ips (~> 2.8) + benchmark-memory (< 0.2) + builder + climate_control (~> 0.2.0) + concurrent-ruby + datadog! + dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) + extlz4 (~> 0.3, >= 0.3.3) + google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) + json-schema (< 3) + memory_profiler (~> 0.9) + os (~> 1.1) + pimpmychangelog (>= 0.1.2) + pry + pry-byebug + pry-stack_explorer + rack-contrib + rack-test + rake (>= 10.5) + rake-compiler (~> 1.1, >= 1.1.1) + redcarpet (~> 3.4) + rspec (~> 3.12) + rspec-collection_matchers (~> 1.1) + rspec-wait (~> 0) + rspec_junit_formatter (>= 0.5.1) + rspec_n (~> 1.3) + rubocop (~> 1.50.0) + rubocop-packaging (~> 0.5.2) + rubocop-performance (~> 1.9) + rubocop-rspec (~> 2.20, < 2.21) + simplecov! + simplecov-cobertura (~> 2.1.0) + sinatra (~> 2) + warning (~> 1) + webmock (>= 3.10.0) + yard (~> 0.9) + +BUNDLED WITH + 2.3.26 diff --git a/gemfiles/ruby_2.6_sinatra_3.gemfile b/gemfiles/ruby_2.6_sinatra_3.gemfile new file mode 100644 index 00000000000..79d0b596b29 --- /dev/null +++ b/gemfiles/ruby_2.6_sinatra_3.gemfile @@ -0,0 +1,46 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal", "~> 2.4.0" +gem "benchmark-ips", "~> 2.8" +gem "benchmark-memory", "< 0.2" +gem "builder" +gem "climate_control", "~> 0.2.0" +gem "concurrent-ruby" +gem "extlz4", "~> 0.3", ">= 0.3.3" +gem "json-schema", "< 3" +gem "memory_profiler", "~> 0.9" +gem "os", "~> 1.1" +gem "pimpmychangelog", ">= 0.1.2" +gem "pry" +gem "pry-byebug" +gem "pry-stack_explorer" +gem "rake", ">= 10.5" +gem "rake-compiler", "~> 1.1", ">= 1.1.1" +gem "redcarpet", "~> 3.4" +gem "rspec", "~> 3.12" +gem "rspec-collection_matchers", "~> 1.1" +gem "rspec-wait", "~> 0" +gem "rspec_junit_formatter", ">= 0.5.1" +gem "rspec_n", "~> 1.3" +gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" +gem "simplecov-cobertura", "~> 2.1.0" +gem "warning", "~> 1" +gem "webmock", ">= 3.10.0" +gem "yard", "~> 0.9" +gem "rubocop", "~> 1.50.0", require: false +gem "rubocop-packaging", "~> 0.5.2", require: false +gem "rubocop-performance", "~> 1.9", require: false +gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false +gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" +gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] +gem "sinatra", "~> 3" +gem "rack-contrib" +gem "rack-test" + +group :check do + +end + +gemspec path: "../" diff --git a/gemfiles/ruby_2.6_sinatra_3.gemfile.lock b/gemfiles/ruby_2.6_sinatra_3.gemfile.lock new file mode 100644 index 00000000000..ac20f4e0caa --- /dev/null +++ b/gemfiles/ruby_2.6_sinatra_3.gemfile.lock @@ -0,0 +1,213 @@ +GIT + remote: https://github.com/DataDog/simplecov + revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db + specs: + simplecov (0.21.2) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + +PATH + remote: .. + specs: + datadog (2.0.0.beta2) + debase-ruby_core_source (= 3.3.1) + libdatadog (~> 7.0.0.1.0) + libddwaf (~> 1.14.0.0.0) + msgpack + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + appraisal (2.4.1) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + base64 (0.2.0) + benchmark-ips (2.13.0) + benchmark-memory (0.1.2) + memory_profiler (~> 0.9) + bigdecimal (3.1.7) + binding_of_caller (1.0.1) + debug_inspector (>= 1.2.0) + builder (3.2.4) + byebug (11.1.3) + climate_control (0.2.0) + coderay (1.1.3) + colorize (0.8.1) + concurrent-ruby (1.2.3) + crack (1.0.0) + bigdecimal + rexml + cri (2.15.11) + debase-ruby_core_source (3.3.1) + debug_inspector (1.2.0) + diff-lcs (1.5.1) + docile (1.4.0) + dogstatsd-ruby (5.6.1) + extlz4 (0.3.4) + ffi (1.16.3) + google-protobuf (3.19.1) + google-protobuf (3.19.1-x86_64-linux) + hashdiff (1.1.0) + json (2.7.2) + json-schema (2.8.1) + addressable (>= 2.4) + libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) + libddwaf (1.14.0.0.0-aarch64-linux) + ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) + memory_profiler (0.9.14) + method_source (1.1.0) + msgpack (1.7.2) + mustermann (3.0.0) + ruby2_keywords (~> 0.0.1) + os (1.1.4) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + pimpmychangelog (0.1.3) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.8.0) + byebug (~> 11.0) + pry (~> 0.10) + pry-stack_explorer (0.6.1) + binding_of_caller (~> 1.0) + pry (~> 0.13) + public_suffix (5.0.5) + racc (1.7.3) + rack (2.2.9) + rack-contrib (2.4.0) + rack (< 4) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-test (2.1.0) + rack (>= 1.3) + rainbow (3.1.1) + rake (13.2.1) + rake-compiler (1.2.7) + rake + redcarpet (3.6.0) + regexp_parser (2.9.0) + rexml (3.2.6) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-collection_matchers (1.2.1) + rspec-expectations (>= 2.99.0.beta1) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rspec-wait (0.0.10) + rspec (>= 3.0) + rspec_junit_formatter (0.6.0) + rspec-core (>= 2, < 4, != 2.12.0) + rspec_n (1.4.0) + colorize (~> 0.8.0) + cri (~> 2.15.3) + rubocop (1.50.2) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.18.0) + rubocop (~> 1.41) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-performance (1.17.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rspec (2.20.0) + rubocop (~> 1.33) + rubocop-capybara (~> 2.17) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sinatra (3.2.0) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.2.0) + tilt (~> 2.0) + thor (1.3.1) + tilt (2.3.0) + unicode-display_width (2.5.0) + warning (1.3.0) + webmock (3.23.0) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + yard (0.9.36) + +PLATFORMS + aarch64-linux + x86_64-linux + +DEPENDENCIES + appraisal (~> 2.4.0) + benchmark-ips (~> 2.8) + benchmark-memory (< 0.2) + builder + climate_control (~> 0.2.0) + concurrent-ruby + datadog! + dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) + extlz4 (~> 0.3, >= 0.3.3) + google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) + json-schema (< 3) + memory_profiler (~> 0.9) + os (~> 1.1) + pimpmychangelog (>= 0.1.2) + pry + pry-byebug + pry-stack_explorer + rack-contrib + rack-test + rake (>= 10.5) + rake-compiler (~> 1.1, >= 1.1.1) + redcarpet (~> 3.4) + rspec (~> 3.12) + rspec-collection_matchers (~> 1.1) + rspec-wait (~> 0) + rspec_junit_formatter (>= 0.5.1) + rspec_n (~> 1.3) + rubocop (~> 1.50.0) + rubocop-packaging (~> 0.5.2) + rubocop-performance (~> 1.9) + rubocop-rspec (~> 2.20, < 2.21) + simplecov! + simplecov-cobertura (~> 2.1.0) + sinatra (~> 3) + warning (~> 1) + webmock (>= 3.10.0) + yard (~> 0.9) + +BUNDLED WITH + 2.3.26 diff --git a/gemfiles/ruby_2.7_sinatra_2.gemfile.lock b/gemfiles/ruby_2.7_sinatra_2.gemfile.lock index 40a05b97331..70e037578b2 100644 --- a/gemfiles/ruby_2.7_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_2.7_sinatra_2.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -162,6 +166,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_2.7_sinatra_3.gemfile.lock b/gemfiles/ruby_2.7_sinatra_3.gemfile.lock index 17e22b81913..94c99558370 100644 --- a/gemfiles/ruby_2.7_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_2.7_sinatra_3.gemfile.lock @@ -52,13 +52,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -164,6 +168,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_2.gemfile.lock b/gemfiles/ruby_3.0_sinatra_2.gemfile.lock index f660d17e05e..b9171135608 100644 --- a/gemfiles/ruby_3.0_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_2.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -163,6 +167,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_3.gemfile.lock b/gemfiles/ruby_3.0_sinatra_3.gemfile.lock index 2963965a0c8..d5bc12ab731 100644 --- a/gemfiles/ruby_3.0_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_3.gemfile.lock @@ -52,13 +52,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -165,6 +169,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_4.gemfile.lock b/gemfiles/ruby_3.0_sinatra_4.gemfile.lock index 80f92154bf3..2885d0e82a8 100644 --- a/gemfiles/ruby_3.0_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_4.gemfile.lock @@ -52,13 +52,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -168,6 +172,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_2.gemfile.lock b/gemfiles/ruby_3.1_sinatra_2.gemfile.lock index f660d17e05e..b9171135608 100644 --- a/gemfiles/ruby_3.1_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_2.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -163,6 +167,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_3.gemfile.lock b/gemfiles/ruby_3.1_sinatra_3.gemfile.lock index 2963965a0c8..d5bc12ab731 100644 --- a/gemfiles/ruby_3.1_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_3.gemfile.lock @@ -52,13 +52,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -165,6 +169,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_4.gemfile.lock b/gemfiles/ruby_3.1_sinatra_4.gemfile.lock index 80f92154bf3..2885d0e82a8 100644 --- a/gemfiles/ruby_3.1_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_4.gemfile.lock @@ -52,13 +52,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -168,6 +172,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_2.gemfile.lock b/gemfiles/ruby_3.2_sinatra_2.gemfile.lock index 0b06613b5b8..cb4244b607c 100644 --- a/gemfiles/ruby_3.2_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_2.gemfile.lock @@ -50,13 +50,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -159,6 +163,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_3.gemfile.lock b/gemfiles/ruby_3.2_sinatra_3.gemfile.lock index 99943810388..088daaca5bc 100644 --- a/gemfiles/ruby_3.2_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_3.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -161,6 +165,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_4.gemfile.lock b/gemfiles/ruby_3.2_sinatra_4.gemfile.lock index ac84ea23fca..423dbf101b3 100644 --- a/gemfiles/ruby_3.2_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_4.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -164,6 +168,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_2.gemfile.lock b/gemfiles/ruby_3.3_sinatra_2.gemfile.lock index 0b06613b5b8..cb4244b607c 100644 --- a/gemfiles/ruby_3.3_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_2.gemfile.lock @@ -50,13 +50,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -159,6 +163,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_3.gemfile.lock b/gemfiles/ruby_3.3_sinatra_3.gemfile.lock index 99943810388..088daaca5bc 100644 --- a/gemfiles/ruby_3.3_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_3.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -161,6 +165,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_4.gemfile.lock b/gemfiles/ruby_3.3_sinatra_4.gemfile.lock index ac84ea23fca..423dbf101b3 100644 --- a/gemfiles/ruby_3.3_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_4.gemfile.lock @@ -51,13 +51,17 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) + libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) + libddwaf (1.14.0.0.0-x86_64-linux) + ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -164,6 +168,7 @@ GEM PLATFORMS aarch64-linux + x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) From 683dd7bd79917b1dc519c75bc6b043730ca00554 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Fri, 3 May 2024 14:05:41 -0400 Subject: [PATCH 12/12] remove gemfile changes, sync changes with main, fix tests --- gemfiles/ruby_2.5_sinatra_2.gemfile | 42 ---- gemfiles/ruby_2.5_sinatra_2.gemfile.lock | 172 -------------- gemfiles/ruby_2.6_sinatra_2.gemfile | 46 ---- gemfiles/ruby_2.6_sinatra_2.gemfile.lock | 211 ----------------- gemfiles/ruby_2.6_sinatra_3.gemfile | 46 ---- gemfiles/ruby_2.6_sinatra_3.gemfile.lock | 213 ------------------ gemfiles/ruby_2.7_sinatra_2.gemfile.lock | 5 - gemfiles/ruby_2.7_sinatra_3.gemfile.lock | 5 - gemfiles/ruby_3.0_sinatra_2.gemfile.lock | 5 - gemfiles/ruby_3.0_sinatra_3.gemfile.lock | 5 - gemfiles/ruby_3.0_sinatra_4.gemfile.lock | 5 - gemfiles/ruby_3.1_sinatra_2.gemfile.lock | 5 - gemfiles/ruby_3.1_sinatra_3.gemfile.lock | 5 - gemfiles/ruby_3.1_sinatra_4.gemfile.lock | 5 - gemfiles/ruby_3.2_sinatra_2.gemfile.lock | 5 - gemfiles/ruby_3.2_sinatra_3.gemfile.lock | 5 - gemfiles/ruby_3.2_sinatra_4.gemfile.lock | 5 - gemfiles/ruby_3.3_sinatra_2.gemfile.lock | 5 - gemfiles/ruby_3.3_sinatra_3.gemfile.lock | 5 - gemfiles/ruby_3.3_sinatra_4.gemfile.lock | 5 - .../opentelemetry/sdk/span_processor.rb | 4 +- lib/datadog/tracing/span_operation.rb | 3 +- spec/datadog/opentelemetry_spec.rb | 6 +- spec/datadog/tracing/span_operation_spec.rb | 2 +- 24 files changed, 7 insertions(+), 808 deletions(-) delete mode 100644 gemfiles/ruby_2.5_sinatra_2.gemfile delete mode 100644 gemfiles/ruby_2.5_sinatra_2.gemfile.lock delete mode 100644 gemfiles/ruby_2.6_sinatra_2.gemfile delete mode 100644 gemfiles/ruby_2.6_sinatra_2.gemfile.lock delete mode 100644 gemfiles/ruby_2.6_sinatra_3.gemfile delete mode 100644 gemfiles/ruby_2.6_sinatra_3.gemfile.lock diff --git a/gemfiles/ruby_2.5_sinatra_2.gemfile b/gemfiles/ruby_2.5_sinatra_2.gemfile deleted file mode 100644 index 7a5eaee80b8..00000000000 --- a/gemfiles/ruby_2.5_sinatra_2.gemfile +++ /dev/null @@ -1,42 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "appraisal", "~> 2.4.0" -gem "benchmark-ips", "~> 2.8" -gem "benchmark-memory", "< 0.2" -gem "builder" -gem "climate_control", "~> 0.2.0" -gem "concurrent-ruby" -gem "extlz4", "~> 0.3", ">= 0.3.3" -gem "json-schema", "< 3" -gem "memory_profiler", "~> 0.9" -gem "os", "~> 1.1" -gem "pimpmychangelog", ">= 0.1.2" -gem "pry" -gem "pry-nav" -gem "pry-stack_explorer" -gem "rake", ">= 10.5" -gem "rake-compiler", "~> 1.1", ">= 1.1.1" -gem "redcarpet", "~> 3.4" -gem "rspec", "~> 3.12" -gem "rspec-collection_matchers", "~> 1.1" -gem "rspec-wait", "~> 0" -gem "rspec_junit_formatter", ">= 0.5.1" -gem "rspec_n", "~> 1.3" -gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" -gem "simplecov-cobertura", "~> 2.1.0" -gem "warning", "~> 1" -gem "webmock", ">= 3.10.0" -gem "yard", "~> 0.9" -gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" -gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] -gem "sinatra", "~> 2" -gem "rack-contrib" -gem "rack-test" - -group :check do - -end - -gemspec path: "../" diff --git a/gemfiles/ruby_2.5_sinatra_2.gemfile.lock b/gemfiles/ruby_2.5_sinatra_2.gemfile.lock deleted file mode 100644 index 5c3c7ae60a0..00000000000 --- a/gemfiles/ruby_2.5_sinatra_2.gemfile.lock +++ /dev/null @@ -1,172 +0,0 @@ -GIT - remote: https://github.com/DataDog/simplecov - revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - specs: - simplecov (0.21.2) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - -PATH - remote: .. - specs: - datadog (2.0.0.beta2) - debase-ruby_core_source (= 3.3.1) - libdatadog (~> 7.0.0.1.0) - libddwaf (~> 1.14.0.0.0) - msgpack - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - appraisal (2.4.1) - bundler - rake - thor (>= 0.14.0) - benchmark-ips (2.13.0) - benchmark-memory (0.1.2) - memory_profiler (~> 0.9) - bigdecimal (3.1.7) - binding_of_caller (0.8.0) - debug_inspector (>= 0.0.1) - builder (3.2.4) - climate_control (0.2.0) - coderay (1.1.3) - colorize (0.8.1) - concurrent-ruby (1.2.3) - crack (1.0.0) - bigdecimal - rexml - cri (2.15.11) - debase-ruby_core_source (3.3.1) - debug_inspector (1.2.0) - diff-lcs (1.5.1) - docile (1.4.0) - dogstatsd-ruby (5.6.1) - extlz4 (0.3.4) - ffi (1.16.3) - google-protobuf (3.19.1) - google-protobuf (3.19.1-x86_64-linux) - hashdiff (1.1.0) - json-schema (2.8.1) - addressable (>= 2.4) - libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) - libddwaf (1.14.0.0.0-aarch64-linux) - ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) - memory_profiler (0.9.14) - method_source (1.1.0) - msgpack (1.7.2) - mustermann (2.0.2) - ruby2_keywords (~> 0.0.1) - os (1.1.4) - pimpmychangelog (0.1.3) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-nav (1.0.0) - pry (>= 0.9.10, < 0.15) - pry-stack_explorer (0.4.13) - binding_of_caller (~> 0.7) - pry (~> 0.13) - public_suffix (4.0.7) - rack (2.2.9) - rack-contrib (2.4.0) - rack (< 4) - rack-protection (2.2.4) - rack - rack-test (2.1.0) - rack (>= 1.3) - rake (13.2.1) - rake-compiler (1.2.7) - rake - redcarpet (3.6.0) - rexml (3.2.6) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-collection_matchers (1.2.1) - rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - rspec-wait (0.0.10) - rspec (>= 3.0) - rspec_junit_formatter (0.6.0) - rspec-core (>= 2, < 4, != 2.12.0) - rspec_n (1.3.0) - colorize (~> 0.8.0) - cri (~> 2.15.3) - ruby2_keywords (0.0.5) - simplecov-cobertura (2.1.0) - rexml - simplecov (~> 0.19) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) - sinatra (2.2.4) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.4) - tilt (~> 2.0) - thor (1.2.2) - tilt (2.3.0) - warning (1.3.0) - webmock (3.23.0) - addressable (>= 2.8.0) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - yard (0.9.36) - -PLATFORMS - aarch64-linux - x86_64-linux - -DEPENDENCIES - appraisal (~> 2.4.0) - benchmark-ips (~> 2.8) - benchmark-memory (< 0.2) - builder - climate_control (~> 0.2.0) - concurrent-ruby - datadog! - dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) - extlz4 (~> 0.3, >= 0.3.3) - google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) - json-schema (< 3) - memory_profiler (~> 0.9) - os (~> 1.1) - pimpmychangelog (>= 0.1.2) - pry - pry-nav - pry-stack_explorer - rack-contrib - rack-test - rake (>= 10.5) - rake-compiler (~> 1.1, >= 1.1.1) - redcarpet (~> 3.4) - rspec (~> 3.12) - rspec-collection_matchers (~> 1.1) - rspec-wait (~> 0) - rspec_junit_formatter (>= 0.5.1) - rspec_n (~> 1.3) - simplecov! - simplecov-cobertura (~> 2.1.0) - sinatra (~> 2) - warning (~> 1) - webmock (>= 3.10.0) - yard (~> 0.9) - -BUNDLED WITH - 2.3.27 diff --git a/gemfiles/ruby_2.6_sinatra_2.gemfile b/gemfiles/ruby_2.6_sinatra_2.gemfile deleted file mode 100644 index 5caee35d32e..00000000000 --- a/gemfiles/ruby_2.6_sinatra_2.gemfile +++ /dev/null @@ -1,46 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "appraisal", "~> 2.4.0" -gem "benchmark-ips", "~> 2.8" -gem "benchmark-memory", "< 0.2" -gem "builder" -gem "climate_control", "~> 0.2.0" -gem "concurrent-ruby" -gem "extlz4", "~> 0.3", ">= 0.3.3" -gem "json-schema", "< 3" -gem "memory_profiler", "~> 0.9" -gem "os", "~> 1.1" -gem "pimpmychangelog", ">= 0.1.2" -gem "pry" -gem "pry-byebug" -gem "pry-stack_explorer" -gem "rake", ">= 10.5" -gem "rake-compiler", "~> 1.1", ">= 1.1.1" -gem "redcarpet", "~> 3.4" -gem "rspec", "~> 3.12" -gem "rspec-collection_matchers", "~> 1.1" -gem "rspec-wait", "~> 0" -gem "rspec_junit_formatter", ">= 0.5.1" -gem "rspec_n", "~> 1.3" -gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" -gem "simplecov-cobertura", "~> 2.1.0" -gem "warning", "~> 1" -gem "webmock", ">= 3.10.0" -gem "yard", "~> 0.9" -gem "rubocop", "~> 1.50.0", require: false -gem "rubocop-packaging", "~> 0.5.2", require: false -gem "rubocop-performance", "~> 1.9", require: false -gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false -gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" -gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] -gem "sinatra", "~> 2" -gem "rack-contrib" -gem "rack-test" - -group :check do - -end - -gemspec path: "../" diff --git a/gemfiles/ruby_2.6_sinatra_2.gemfile.lock b/gemfiles/ruby_2.6_sinatra_2.gemfile.lock deleted file mode 100644 index 5fa13cc6773..00000000000 --- a/gemfiles/ruby_2.6_sinatra_2.gemfile.lock +++ /dev/null @@ -1,211 +0,0 @@ -GIT - remote: https://github.com/DataDog/simplecov - revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - specs: - simplecov (0.21.2) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - -PATH - remote: .. - specs: - datadog (2.0.0.beta2) - debase-ruby_core_source (= 3.3.1) - libdatadog (~> 7.0.0.1.0) - libddwaf (~> 1.14.0.0.0) - msgpack - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - appraisal (2.4.1) - bundler - rake - thor (>= 0.14.0) - ast (2.4.2) - benchmark-ips (2.13.0) - benchmark-memory (0.1.2) - memory_profiler (~> 0.9) - bigdecimal (3.1.7) - binding_of_caller (1.0.1) - debug_inspector (>= 1.2.0) - builder (3.2.4) - byebug (11.1.3) - climate_control (0.2.0) - coderay (1.1.3) - colorize (0.8.1) - concurrent-ruby (1.2.3) - crack (1.0.0) - bigdecimal - rexml - cri (2.15.11) - debase-ruby_core_source (3.3.1) - debug_inspector (1.2.0) - diff-lcs (1.5.1) - docile (1.4.0) - dogstatsd-ruby (5.6.1) - extlz4 (0.3.4) - ffi (1.16.3) - google-protobuf (3.19.1) - google-protobuf (3.19.1-x86_64-linux) - hashdiff (1.1.0) - json (2.7.2) - json-schema (2.8.1) - addressable (>= 2.4) - libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) - libddwaf (1.14.0.0.0-aarch64-linux) - ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) - memory_profiler (0.9.14) - method_source (1.1.0) - msgpack (1.7.2) - mustermann (2.0.2) - ruby2_keywords (~> 0.0.1) - os (1.1.4) - parallel (1.24.0) - parser (3.3.1.0) - ast (~> 2.4.1) - racc - pimpmychangelog (0.1.3) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.8.0) - byebug (~> 11.0) - pry (~> 0.10) - pry-stack_explorer (0.6.1) - binding_of_caller (~> 1.0) - pry (~> 0.13) - public_suffix (5.0.5) - racc (1.7.3) - rack (2.2.9) - rack-contrib (2.4.0) - rack (< 4) - rack-protection (2.2.4) - rack - rack-test (2.1.0) - rack (>= 1.3) - rainbow (3.1.1) - rake (13.2.1) - rake-compiler (1.2.7) - rake - redcarpet (3.6.0) - regexp_parser (2.9.0) - rexml (3.2.6) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-collection_matchers (1.2.1) - rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - rspec-wait (0.0.10) - rspec (>= 3.0) - rspec_junit_formatter (0.6.0) - rspec-core (>= 2, < 4, != 2.12.0) - rspec_n (1.4.0) - colorize (~> 0.8.0) - cri (~> 2.15.3) - rubocop (1.50.2) - json (~> 2.3) - parallel (~> 1.10) - parser (>= 3.2.0.0) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) - rubocop (~> 1.41) - rubocop-packaging (0.5.2) - rubocop (>= 1.33, < 2.0) - rubocop-performance (1.17.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) - rubocop-rspec (2.20.0) - rubocop (~> 1.33) - rubocop-capybara (~> 2.17) - ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) - simplecov-cobertura (2.1.0) - rexml - simplecov (~> 0.19) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) - sinatra (2.2.4) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.4) - tilt (~> 2.0) - thor (1.3.1) - tilt (2.3.0) - unicode-display_width (2.5.0) - warning (1.3.0) - webmock (3.23.0) - addressable (>= 2.8.0) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - yard (0.9.36) - -PLATFORMS - aarch64-linux - x86_64-linux - -DEPENDENCIES - appraisal (~> 2.4.0) - benchmark-ips (~> 2.8) - benchmark-memory (< 0.2) - builder - climate_control (~> 0.2.0) - concurrent-ruby - datadog! - dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) - extlz4 (~> 0.3, >= 0.3.3) - google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) - json-schema (< 3) - memory_profiler (~> 0.9) - os (~> 1.1) - pimpmychangelog (>= 0.1.2) - pry - pry-byebug - pry-stack_explorer - rack-contrib - rack-test - rake (>= 10.5) - rake-compiler (~> 1.1, >= 1.1.1) - redcarpet (~> 3.4) - rspec (~> 3.12) - rspec-collection_matchers (~> 1.1) - rspec-wait (~> 0) - rspec_junit_formatter (>= 0.5.1) - rspec_n (~> 1.3) - rubocop (~> 1.50.0) - rubocop-packaging (~> 0.5.2) - rubocop-performance (~> 1.9) - rubocop-rspec (~> 2.20, < 2.21) - simplecov! - simplecov-cobertura (~> 2.1.0) - sinatra (~> 2) - warning (~> 1) - webmock (>= 3.10.0) - yard (~> 0.9) - -BUNDLED WITH - 2.3.26 diff --git a/gemfiles/ruby_2.6_sinatra_3.gemfile b/gemfiles/ruby_2.6_sinatra_3.gemfile deleted file mode 100644 index 79d0b596b29..00000000000 --- a/gemfiles/ruby_2.6_sinatra_3.gemfile +++ /dev/null @@ -1,46 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "appraisal", "~> 2.4.0" -gem "benchmark-ips", "~> 2.8" -gem "benchmark-memory", "< 0.2" -gem "builder" -gem "climate_control", "~> 0.2.0" -gem "concurrent-ruby" -gem "extlz4", "~> 0.3", ">= 0.3.3" -gem "json-schema", "< 3" -gem "memory_profiler", "~> 0.9" -gem "os", "~> 1.1" -gem "pimpmychangelog", ">= 0.1.2" -gem "pry" -gem "pry-byebug" -gem "pry-stack_explorer" -gem "rake", ">= 10.5" -gem "rake-compiler", "~> 1.1", ">= 1.1.1" -gem "redcarpet", "~> 3.4" -gem "rspec", "~> 3.12" -gem "rspec-collection_matchers", "~> 1.1" -gem "rspec-wait", "~> 0" -gem "rspec_junit_formatter", ">= 0.5.1" -gem "rspec_n", "~> 1.3" -gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" -gem "simplecov-cobertura", "~> 2.1.0" -gem "warning", "~> 1" -gem "webmock", ">= 3.10.0" -gem "yard", "~> 0.9" -gem "rubocop", "~> 1.50.0", require: false -gem "rubocop-packaging", "~> 0.5.2", require: false -gem "rubocop-performance", "~> 1.9", require: false -gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false -gem "dogstatsd-ruby", ">= 3.3.0", "!= 5.0.0", "!= 5.0.1", "!= 5.1.0" -gem "google-protobuf", ["~> 3.0", "!= 3.7.0", "!= 3.7.1", "< 3.19.2"] -gem "sinatra", "~> 3" -gem "rack-contrib" -gem "rack-test" - -group :check do - -end - -gemspec path: "../" diff --git a/gemfiles/ruby_2.6_sinatra_3.gemfile.lock b/gemfiles/ruby_2.6_sinatra_3.gemfile.lock deleted file mode 100644 index ac20f4e0caa..00000000000 --- a/gemfiles/ruby_2.6_sinatra_3.gemfile.lock +++ /dev/null @@ -1,213 +0,0 @@ -GIT - remote: https://github.com/DataDog/simplecov - revision: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - ref: 3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db - specs: - simplecov (0.21.2) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - -PATH - remote: .. - specs: - datadog (2.0.0.beta2) - debase-ruby_core_source (= 3.3.1) - libdatadog (~> 7.0.0.1.0) - libddwaf (~> 1.14.0.0.0) - msgpack - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - appraisal (2.4.1) - bundler - rake - thor (>= 0.14.0) - ast (2.4.2) - base64 (0.2.0) - benchmark-ips (2.13.0) - benchmark-memory (0.1.2) - memory_profiler (~> 0.9) - bigdecimal (3.1.7) - binding_of_caller (1.0.1) - debug_inspector (>= 1.2.0) - builder (3.2.4) - byebug (11.1.3) - climate_control (0.2.0) - coderay (1.1.3) - colorize (0.8.1) - concurrent-ruby (1.2.3) - crack (1.0.0) - bigdecimal - rexml - cri (2.15.11) - debase-ruby_core_source (3.3.1) - debug_inspector (1.2.0) - diff-lcs (1.5.1) - docile (1.4.0) - dogstatsd-ruby (5.6.1) - extlz4 (0.3.4) - ffi (1.16.3) - google-protobuf (3.19.1) - google-protobuf (3.19.1-x86_64-linux) - hashdiff (1.1.0) - json (2.7.2) - json-schema (2.8.1) - addressable (>= 2.4) - libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) - libddwaf (1.14.0.0.0-aarch64-linux) - ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) - memory_profiler (0.9.14) - method_source (1.1.0) - msgpack (1.7.2) - mustermann (3.0.0) - ruby2_keywords (~> 0.0.1) - os (1.1.4) - parallel (1.24.0) - parser (3.3.1.0) - ast (~> 2.4.1) - racc - pimpmychangelog (0.1.3) - pry (0.14.2) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.8.0) - byebug (~> 11.0) - pry (~> 0.10) - pry-stack_explorer (0.6.1) - binding_of_caller (~> 1.0) - pry (~> 0.13) - public_suffix (5.0.5) - racc (1.7.3) - rack (2.2.9) - rack-contrib (2.4.0) - rack (< 4) - rack-protection (3.2.0) - base64 (>= 0.1.0) - rack (~> 2.2, >= 2.2.4) - rack-test (2.1.0) - rack (>= 1.3) - rainbow (3.1.1) - rake (13.2.1) - rake-compiler (1.2.7) - rake - redcarpet (3.6.0) - regexp_parser (2.9.0) - rexml (3.2.6) - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-collection_matchers (1.2.1) - rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - rspec-wait (0.0.10) - rspec (>= 3.0) - rspec_junit_formatter (0.6.0) - rspec-core (>= 2, < 4, != 2.12.0) - rspec_n (1.4.0) - colorize (~> 0.8.0) - cri (~> 2.15.3) - rubocop (1.50.2) - json (~> 2.3) - parallel (~> 1.10) - parser (>= 3.2.0.0) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) - rubocop (~> 1.41) - rubocop-packaging (0.5.2) - rubocop (>= 1.33, < 2.0) - rubocop-performance (1.17.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) - rubocop-rspec (2.20.0) - rubocop (~> 1.33) - rubocop-capybara (~> 2.17) - ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) - simplecov-cobertura (2.1.0) - rexml - simplecov (~> 0.19) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.4) - sinatra (3.2.0) - mustermann (~> 3.0) - rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.2.0) - tilt (~> 2.0) - thor (1.3.1) - tilt (2.3.0) - unicode-display_width (2.5.0) - warning (1.3.0) - webmock (3.23.0) - addressable (>= 2.8.0) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - yard (0.9.36) - -PLATFORMS - aarch64-linux - x86_64-linux - -DEPENDENCIES - appraisal (~> 2.4.0) - benchmark-ips (~> 2.8) - benchmark-memory (< 0.2) - builder - climate_control (~> 0.2.0) - concurrent-ruby - datadog! - dogstatsd-ruby (>= 3.3.0, != 5.1.0, != 5.0.1, != 5.0.0) - extlz4 (~> 0.3, >= 0.3.3) - google-protobuf (~> 3.0, < 3.19.2, != 3.7.1, != 3.7.0) - json-schema (< 3) - memory_profiler (~> 0.9) - os (~> 1.1) - pimpmychangelog (>= 0.1.2) - pry - pry-byebug - pry-stack_explorer - rack-contrib - rack-test - rake (>= 10.5) - rake-compiler (~> 1.1, >= 1.1.1) - redcarpet (~> 3.4) - rspec (~> 3.12) - rspec-collection_matchers (~> 1.1) - rspec-wait (~> 0) - rspec_junit_formatter (>= 0.5.1) - rspec_n (~> 1.3) - rubocop (~> 1.50.0) - rubocop-packaging (~> 0.5.2) - rubocop-performance (~> 1.9) - rubocop-rspec (~> 2.20, < 2.21) - simplecov! - simplecov-cobertura (~> 2.1.0) - sinatra (~> 3) - warning (~> 1) - webmock (>= 3.10.0) - yard (~> 0.9) - -BUNDLED WITH - 2.3.26 diff --git a/gemfiles/ruby_2.7_sinatra_2.gemfile.lock b/gemfiles/ruby_2.7_sinatra_2.gemfile.lock index 70e037578b2..40a05b97331 100644 --- a/gemfiles/ruby_2.7_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_2.7_sinatra_2.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -166,7 +162,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_2.7_sinatra_3.gemfile.lock b/gemfiles/ruby_2.7_sinatra_3.gemfile.lock index 94c99558370..17e22b81913 100644 --- a/gemfiles/ruby_2.7_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_2.7_sinatra_3.gemfile.lock @@ -52,17 +52,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -168,7 +164,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_2.gemfile.lock b/gemfiles/ruby_3.0_sinatra_2.gemfile.lock index b9171135608..f660d17e05e 100644 --- a/gemfiles/ruby_3.0_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_2.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -167,7 +163,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_3.gemfile.lock b/gemfiles/ruby_3.0_sinatra_3.gemfile.lock index d5bc12ab731..2963965a0c8 100644 --- a/gemfiles/ruby_3.0_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_3.gemfile.lock @@ -52,17 +52,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -169,7 +165,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.0_sinatra_4.gemfile.lock b/gemfiles/ruby_3.0_sinatra_4.gemfile.lock index 2885d0e82a8..80f92154bf3 100644 --- a/gemfiles/ruby_3.0_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.0_sinatra_4.gemfile.lock @@ -52,17 +52,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -172,7 +168,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_2.gemfile.lock b/gemfiles/ruby_3.1_sinatra_2.gemfile.lock index b9171135608..f660d17e05e 100644 --- a/gemfiles/ruby_3.1_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_2.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -167,7 +163,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_3.gemfile.lock b/gemfiles/ruby_3.1_sinatra_3.gemfile.lock index d5bc12ab731..2963965a0c8 100644 --- a/gemfiles/ruby_3.1_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_3.gemfile.lock @@ -52,17 +52,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -169,7 +165,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.1_sinatra_4.gemfile.lock b/gemfiles/ruby_3.1_sinatra_4.gemfile.lock index 2885d0e82a8..80f92154bf3 100644 --- a/gemfiles/ruby_3.1_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.1_sinatra_4.gemfile.lock @@ -52,17 +52,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -172,7 +168,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_2.gemfile.lock b/gemfiles/ruby_3.2_sinatra_2.gemfile.lock index cb4244b607c..0b06613b5b8 100644 --- a/gemfiles/ruby_3.2_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_2.gemfile.lock @@ -50,17 +50,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -163,7 +159,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_3.gemfile.lock b/gemfiles/ruby_3.2_sinatra_3.gemfile.lock index 088daaca5bc..99943810388 100644 --- a/gemfiles/ruby_3.2_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_3.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -165,7 +161,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.2_sinatra_4.gemfile.lock b/gemfiles/ruby_3.2_sinatra_4.gemfile.lock index 423dbf101b3..ac84ea23fca 100644 --- a/gemfiles/ruby_3.2_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.2_sinatra_4.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -168,7 +164,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_2.gemfile.lock b/gemfiles/ruby_3.3_sinatra_2.gemfile.lock index cb4244b607c..0b06613b5b8 100644 --- a/gemfiles/ruby_3.3_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_2.gemfile.lock @@ -50,17 +50,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -163,7 +159,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_3.gemfile.lock b/gemfiles/ruby_3.3_sinatra_3.gemfile.lock index 088daaca5bc..99943810388 100644 --- a/gemfiles/ruby_3.3_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_3.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -165,7 +161,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/gemfiles/ruby_3.3_sinatra_4.gemfile.lock b/gemfiles/ruby_3.3_sinatra_4.gemfile.lock index 423dbf101b3..ac84ea23fca 100644 --- a/gemfiles/ruby_3.3_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.3_sinatra_4.gemfile.lock @@ -51,17 +51,13 @@ GEM extlz4 (0.3.4) ffi (1.16.3) google-protobuf (3.25.3-aarch64-linux) - google-protobuf (3.25.3-x86_64-linux) hashdiff (1.1.0) json (2.7.2) json-schema (2.8.1) addressable (>= 2.4) libdatadog (7.0.0.1.0-aarch64-linux) - libdatadog (7.0.0.1.0-x86_64-linux) libddwaf (1.14.0.0.0-aarch64-linux) ffi (~> 1.0) - libddwaf (1.14.0.0.0-x86_64-linux) - ffi (~> 1.0) memory_profiler (0.9.14) method_source (1.1.0) msgpack (1.7.2) @@ -168,7 +164,6 @@ GEM PLATFORMS aarch64-linux - x86_64-linux DEPENDENCIES appraisal (~> 2.4.0) diff --git a/lib/datadog/opentelemetry/sdk/span_processor.rb b/lib/datadog/opentelemetry/sdk/span_processor.rb index 5b50a38b07c..f4c09b6f9fc 100644 --- a/lib/datadog/opentelemetry/sdk/span_processor.rb +++ b/lib/datadog/opentelemetry/sdk/span_processor.rb @@ -92,10 +92,10 @@ def start_datadog_span(span) unless span.links.nil? datadog_span.links = span.links.map do |link| Datadog::Tracing::SpanLink.new( - digest: Datadog::Tracing::TraceDigest.new( + Datadog::Tracing::TraceDigest.new( trace_id: link.span_context.hex_trace_id.to_i(16), span_id: link.span_context.hex_span_id.to_i(16), - trace_flags: (link.span_context.trace_flags&.sampled? ? 1 : 0), + trace_sampling_priority: (link.span_context.trace_flags&.sampled? ? 1 : 0), trace_state: link.span_context.tracestate&.to_s, span_remote: link.span_context.remote?, ), diff --git a/lib/datadog/tracing/span_operation.rb b/lib/datadog/tracing/span_operation.rb index 18e869d16b7..cb3edde7862 100644 --- a/lib/datadog/tracing/span_operation.rb +++ b/lib/datadog/tracing/span_operation.rb @@ -259,8 +259,7 @@ def finished? def duration return @duration_end - @duration_start if @duration_start && @duration_end - - @end_time - @start_time if @start_time && @end_time + return @end_time - @start_time if @start_time && @end_time end def set_error(e) diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index 623d5893cc2..54ced07cf46 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -352,9 +352,9 @@ expect(span.links[0].attributes).to eq({ 'key' => 'val', '1' => true }) expect(span.links[1].trace_id).to eq(1234534) - expect(span.links[1].span_id).to eq(67890) - expect(span.links[1].trace_flags).to eq(10) - expect(span.links[1].trace_state).to eq(sc2.tracestate.to_s) + expect(span.links[1].span_id).to eq(10) + expect(span.links[1].trace_flags).to eq(1) + expect(span.links[1].trace_state).to eq('otel=blahxd') expect(span.links[1].attributes).to eq({ 'key2' => true, 'list' => [1, 2] }) end end diff --git a/spec/datadog/tracing/span_operation_spec.rb b/spec/datadog/tracing/span_operation_spec.rb index eb2f47da1c0..a8de6c79873 100644 --- a/spec/datadog/tracing/span_operation_spec.rb +++ b/spec/datadog/tracing/span_operation_spec.rb @@ -242,7 +242,7 @@ context 'that is an Array' do let(:span_links) do [Datadog::Tracing::SpanLink.new( - digest: Datadog::Tracing::TraceDigest.new(trace_id: 1, span_id: 2), + Datadog::Tracing::TraceDigest.new(trace_id: 1, span_id: 2), attributes: { "link.name": 'moon' } )] end