Skip to content

Commit

Permalink
rename set_internal_tracing_context! to set_trace_origin as this is w…
Browse files Browse the repository at this point in the history
…hat it does
  • Loading branch information
anmarchenko committed Nov 8, 2023
1 parent b61b2c7 commit 8b5636e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/datadog/ci/recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def trace_test(test_name, service_name: nil, operation_name: "test", tags: {}, &

if block
Datadog::Tracing.trace(operation_name, **span_options) do |tracer_span, trace|
set_internal_tracing_context!(trace, tracer_span)
set_trace_origin(trace)

test = build_test(tracer_span, tags)

Expand All @@ -48,7 +48,7 @@ def trace_test(test_name, service_name: nil, operation_name: "test", tags: {}, &
tracer_span = Datadog::Tracing.trace(operation_name, **span_options)
trace = Datadog::Tracing.active_trace

set_internal_tracing_context!(trace, tracer_span)
set_trace_origin(trace)

test = build_test(tracer_span, tags)
@local_context.activate_test!(test)
Expand Down Expand Up @@ -89,8 +89,8 @@ def active_span

private

def set_internal_tracing_context!(trace, span)
# Sets trace's origin to ciapp-test
# Sets trace's origin to ciapp-test
def set_trace_origin(trace)
trace.origin = Ext::Test::CONTEXT_ORIGIN if trace
end

Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/ci/recorder.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Datadog

def create_datadog_span: (String span_name, ?span_options: Hash[untyped, untyped], ?tags: Hash[untyped, untyped]) ?{ (Datadog::CI::Span span) -> untyped } -> untyped

def set_internal_tracing_context!: (Datadog::Tracing::TraceOperation trace, Datadog::Tracing::SpanOperation span) -> untyped
def set_trace_origin: (Datadog::Tracing::TraceOperation trace) -> untyped

private

Expand Down

0 comments on commit 8b5636e

Please sign in to comment.