Class: Deimos::Tracing::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/deimos/tracing/provider.rb

Overview

Base class for all tracing providers.

Direct Known Subclasses

Datadog, Mock

Instance Method Summary collapse

Instance Method Details

#active_spanObject

Get the currently activated span.

Returns:

  • (Object)

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/deimos/tracing/provider.rb', line 32

def active_span
  raise NotImplementedError
end

#finish(span) ⇒ void

This method returns an undefined value.

Finishes the trace on the span object.

Parameters:

  • span (Object)

    The span to finish trace on

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/deimos/tracing/provider.rb', line 18

def finish(span)
  raise NotImplementedError
end

#get_tag(tag) ⇒ Object

Get a tag from a span with the specified tag.

Parameters:

  • tag (String)

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/deimos/tracing/provider.rb', line 47

def get_tag(tag)
  raise NotImplementedError
end

#set_error(span, exception) ⇒ void

This method returns an undefined value.

Set an error on the span.

Parameters:

  • span (Object)

    The span to set error on

  • exception (Exception)

    The exception that occurred

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/deimos/tracing/provider.rb', line 26

def set_error(span, exception)
  raise NotImplementedError
end

#set_tag(tag, value, span = nil) ⇒ void

This method returns an undefined value.

Set a tag to a span. Use the currently active span if not given.

Parameters:

  • tag (String)
  • value (String)
  • span (Object) (defaults to: nil)

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/deimos/tracing/provider.rb', line 41

def set_tag(tag, value, span=nil)
  raise NotImplementedError
end

#start(span_name, options = {}) ⇒ Object

Returns a span object and starts the trace.

Parameters:

  • span_name (String)

    The name of the span/trace

  • options (Hash) (defaults to: {})

    Options for the span

Returns:

  • (Object)

    The span object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/deimos/tracing/provider.rb', line 11

def start(span_name, options={})
  raise NotImplementedError
end