-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #553 from DataDog/0.16-dev
0.16.0 to stable
- Loading branch information
Showing
47 changed files
with
2,741 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module Datadog | ||
# Namespace for ddtrace OpenTracing implementation | ||
module OpenTracer | ||
module_function | ||
|
||
def supported? | ||
Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1') | ||
end | ||
|
||
def load_opentracer | ||
require 'opentracing' | ||
require 'opentracing/carrier' | ||
require 'ddtrace' | ||
require 'ddtrace/opentracer/carrier' | ||
require 'ddtrace/opentracer/tracer' | ||
require 'ddtrace/opentracer/span' | ||
require 'ddtrace/opentracer/span_context' | ||
require 'ddtrace/opentracer/span_context_factory' | ||
require 'ddtrace/opentracer/scope' | ||
require 'ddtrace/opentracer/scope_manager' | ||
require 'ddtrace/opentracer/thread_local_scope' | ||
require 'ddtrace/opentracer/thread_local_scope_manager' | ||
require 'ddtrace/opentracer/distributed_headers' | ||
require 'ddtrace/opentracer/propagator' | ||
require 'ddtrace/opentracer/text_map_propagator' | ||
require 'ddtrace/opentracer/binary_propagator' | ||
require 'ddtrace/opentracer/rack_propagator' | ||
require 'ddtrace/opentracer/global_tracer' | ||
|
||
# Modify the OpenTracing module functions | ||
OpenTracing.module_eval do | ||
class << self | ||
prepend Datadog::OpenTracer::GlobalTracer | ||
end | ||
end | ||
end | ||
|
||
load_opentracer if supported? | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Datadog | ||
module OpenTracer | ||
# OpenTracing propagator for Datadog::OpenTracer::Tracer | ||
module BinaryPropagator | ||
extend Propagator | ||
|
||
# Inject a SpanContext into the given carrier | ||
# | ||
# @param span_context [SpanContext] | ||
# @param carrier [Carrier] A carrier object of Binary type | ||
def self.inject(span_context, carrier) | ||
nil | ||
end | ||
|
||
# Extract a SpanContext in Binary format from the given carrier. | ||
# | ||
# @param carrier [Carrier] A carrier object of Binary type | ||
# @return [SpanContext, nil] the extracted SpanContext or nil if none could be found | ||
def self.extract(carrier) | ||
SpanContext::NOOP_INSTANCE | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Datadog | ||
module OpenTracer | ||
class Carrier < ::OpenTracing::Carrier | ||
end | ||
end | ||
end |
Oops, something went wrong.