lib/ddtrace/propagation/http_propagator.rb in ls-trace-0.1.2 vs lib/ddtrace/propagation/http_propagator.rb in ls-trace-0.2.0
- old
+ new
@@ -17,11 +17,11 @@
# inject! popolates the env with span ID, trace ID and sampling priority
def self.inject!(context, env)
# Prevent propagation from being attempted if context provided is nil.
if context.nil?
- ::Datadog::Tracer.log.debug('Cannot inject context into env to propagate over HTTP: context is nil.'.freeze)
+ ::Datadog.logger.debug('Cannot inject context into env to propagate over HTTP: context is nil.'.freeze)
return
end
# Inject all configured propagation styles
::Datadog.configuration.distributed_tracing.propagation_inject_style.each do |style|
@@ -56,10 +56,10 @@
else
unless context.trace_id == extracted_context.trace_id && context.span_id == extracted_context.span_id
# Return an empty/new context if we have a mismatch in values extracted
msg = "#{context.trace_id} != #{extracted_context.trace_id} && " \
"#{context.span_id} != #{extracted_context.span_id}"
- ::Datadog::Tracer.log.debug("Cannot extract context from HTTP: extracted contexts differ, #{msg}".freeze)
+ ::Datadog.logger.debug("Cannot extract context from HTTP: extracted contexts differ, #{msg}".freeze)
# DEV: This will return from `self.extract` not this `each` block
return ::Datadog::Context.new
end
end
end