Sha256: ef8bd9c94642f9f96a210097672f2c354234d1d0ace1172d1c415e59fde3aa05

Contents?: true

Size: 554 Bytes

Versions: 67

Compression:

Stored size: 554 Bytes

Contents

module Datadog
  # DefaultContextProvider is a default context provider that retrieves
  # all contexts from the current thread-local storage. It is suitable for
  # synchronous programming.
  class DefaultContextProvider
    # Initializes the default context provider with a thread-bound context.
    def initialize
      @context = Datadog::ThreadLocalContext.new
    end

    # Sets the current context.
    def context=(ctx)
      @context.local = ctx
    end

    # Return the current context.
    def context
      @context.local
    end
  end
end

Version data entries

67 entries across 67 versions & 3 rubygems

Version Path
ddtrace-0.21.0 lib/ddtrace/provider.rb
ddtrace-0.20.0 lib/ddtrace/provider.rb
ddtrace-0.19.1 lib/ddtrace/provider.rb
ddtrace-0.19.0 lib/ddtrace/provider.rb
ddtrace-0.18.3 lib/ddtrace/provider.rb
ddtrace-0.18.2 lib/ddtrace/provider.rb
ddtrace-0.18.1 lib/ddtrace/provider.rb
ddtrace-0.18.0 lib/ddtrace/provider.rb
ddtrace-0.17.3 lib/ddtrace/provider.rb
ddtrace-0.17.2 lib/ddtrace/provider.rb
ddtrace-0.17.1 lib/ddtrace/provider.rb
ddtrace-0.17.0 lib/ddtrace/provider.rb
ddtrace-0.16.1 lib/ddtrace/provider.rb
fair-ddtrace-0.8.2.a lib/ddtrace/provider.rb
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/provider.rb
ddtrace-0.16.0 lib/ddtrace/provider.rb
ddtrace-0.14.2.disableprotocolversion4 lib/ddtrace/provider.rb
ddtrace-0.15.0 lib/ddtrace/provider.rb
ddtrace-0.14.2.withoutpriorityparsing1 lib/ddtrace/provider.rb
ddtrace-0.14.2 lib/ddtrace/provider.rb