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
ls-trace-0.1.2 lib/ddtrace/provider.rb
ddtrace-0.30.1 lib/ddtrace/provider.rb
ddtrace-0.30.0 lib/ddtrace/provider.rb
ddtrace-0.29.1 lib/ddtrace/provider.rb
ddtrace-0.26.1 lib/ddtrace/provider.rb
ls-trace-0.1.1 lib/ddtrace/provider.rb
ddtrace-0.29.0 lib/ddtrace/provider.rb
ddtrace-0.28.0 lib/ddtrace/provider.rb
ddtrace-0.27.0 lib/ddtrace/provider.rb
ddtrace-0.26.0 lib/ddtrace/provider.rb
ddtrace-0.25.1 lib/ddtrace/provider.rb
ddtrace-0.25.0 lib/ddtrace/provider.rb
ddtrace-0.24.0 lib/ddtrace/provider.rb
ddtrace-0.23.3 lib/ddtrace/provider.rb
ddtrace-0.23.2 lib/ddtrace/provider.rb
ddtrace-0.23.1 lib/ddtrace/provider.rb
ddtrace-0.23.0 lib/ddtrace/provider.rb
ddtrace-0.22.0 lib/ddtrace/provider.rb
ddtrace-0.21.2 lib/ddtrace/provider.rb
ddtrace-0.21.1 lib/ddtrace/provider.rb