Sha256: d2f6f78555ce2bbf777fd4b88777ee9eb48a46a0a9f6bab77d9ebb9ad424afab

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-0.8.1 lib/ddtrace/provider.rb
ddtrace-0.8.0 lib/ddtrace/provider.rb