Sha256: f1ce4d3bdf58683e8735bc6eb2f1025b96332ae6a744475906a92e1e9f153901

Contents?: true

Size: 1.44 KB

Versions: 20

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true

module Deimos
  module Tracing
    # Base class for all tracing providers.
    class Provider
      # Returns a span object and starts the trace.
      # @param span_name [String] The name of the span/trace
      # @param options [Hash] Options for the span
      # @return [Object] The span object
      def start(span_name, options={})
        raise MissingImplementationError
      end

      # Finishes the trace on the span object.
      # @param span [Object] The span to finish trace on
      # @return [void]
      def finish(span)
        raise MissingImplementationError
      end

      # Set an error on the span.
      # @param span [Object] The span to set error on
      # @param exception [Exception] The exception that occurred
      # @return [void]
      def set_error(span, exception)
        raise MissingImplementationError
      end

      # Get the currently activated span.
      # @return [Object]
      def active_span
        raise MissingImplementationError
      end

      # Set a tag to a span. Use the currently active span if not given.
      # @param tag [String]
      # @param value [String]
      # @param span [Object]
      # @return [void]
      def set_tag(tag, value, span=nil)
        raise MissingImplementationError
      end

      # Get a tag from a span with the specified tag.
      # @param tag [String]
      def get_tag(tag)
        raise MissingImplementationError
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
deimos-ruby-2.0.5 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.4 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.3 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.2 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.1 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta7 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta6 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta5 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta4 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta3 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta2 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.beta1 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha7 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha6 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha5 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha4 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha3 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha2 lib/deimos/tracing/provider.rb
deimos-ruby-2.0.0.pre.alpha1 lib/deimos/tracing/provider.rb