Sha256: 5ecb8ca14359b6c2f5bc663cde53818d73d8be8519ec3ed7034375c97b30e8bc

Contents?: true

Size: 1.26 KB

Versions: 26

Compression:

Stored size: 1.26 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 NotImplementedError
      end

      # Finishes the trace on the span object.
      # @param span [Object] The span to finish trace on
      # @return [void]
      def finish(span)
        raise NotImplementedError
      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 NotImplementedError
      end

      # Get the currently activated span.
      # @return [Object]
      def active_span
        raise NotImplementedError
      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 NotImplementedError
      end

    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
deimos-ruby-1.22.5 lib/deimos/tracing/provider.rb
deimos-ruby-1.22.4 lib/deimos/tracing/provider.rb
deimos-ruby-1.22.3 lib/deimos/tracing/provider.rb
deimos-ruby-1.22.2 lib/deimos/tracing/provider.rb
deimos-ruby-1.22.1 lib/deimos/tracing/provider.rb
deimos-ruby-1.22 lib/deimos/tracing/provider.rb
deimos-ruby-1.20.1 lib/deimos/tracing/provider.rb
deimos-ruby-1.20.0 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.7 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.6 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.5 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.4 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.3 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.2 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.1 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.1.pre.beta1 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.0 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.beta2 lib/deimos/tracing/provider.rb
deimos-ruby-1.19.beta1 lib/deimos/tracing/provider.rb
deimos-ruby-1.18.2 lib/deimos/tracing/provider.rb