Class: Deimos::Tracing::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/deimos/tracing/provider.rb,
sig/defs.rbs

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)


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

def active_span
  raise MissingImplementationError
end

#finish(_span) ⇒ void

This method returns an undefined value.

Finishes the trace on the span object.

@param span — The span to finish trace on

Parameters:

  • span (Object)


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

def finish(_span)
  raise MissingImplementationError
end

#get_tag(_tag) ⇒ Object

Get a tag from a span with the specified tag.

Parameters:

  • tag (String)

Raises:



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

def get_tag(_tag)
  raise MissingImplementationError
end

#set_error(_span, _exception) ⇒ void

This method returns an undefined value.

Set an error on the span.

@param span — The span to set error on

@param exception — The exception that occurred

Parameters:

  • span (Object)
  • exception (Exception)


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

def set_error(_span, _exception)
  raise MissingImplementationError
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.

@param tag

@param value

@param span

Parameters:

  • tag (String)
  • value (String)
  • span (Object, nil)


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

def set_tag(_tag, _value, _span=nil)
  raise MissingImplementationError
end

#start(_span_name, _options = {}) ⇒ Object

Returns a span object and starts the trace.

@param span_name — The name of the span/trace

@param options — Options for the span

@return — The span object

Parameters:

  • span_name (String)
  • options (::Hash[untyped, untyped])

Returns:

  • (Object)


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

def start(_span_name, _options={})
  raise MissingImplementationError
end