Class: Aws::Telemetry::TracerBase

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/telemetry/base.rb

Overview

Base for ‘Tracer` classes.

Direct Known Subclasses

NoOpTracer, OTelTracer

Instance Method Summary collapse

Instance Method Details

#current_spanAws::Telemetry::SpanBase

Returns the current active span.

Returns:

Raises:

  • (NotImplementedError)


72
73
74
# File 'lib/aws-sdk-core/telemetry/base.rb', line 72

def current_span
  raise NotImplementedError
end

#in_span(name, attributes: nil, kind: nil) ⇒ Aws::Telemetry::SpanBase

A helper for the default use-case of extending the current trace with a span. On exit, the Span that was active before calling this method will be reactivated. If an exception occurs during the execution of the provided block, it will be recorded on the span and re-raised.

Parameters:

  • name (String)

    Span name

  • attributes (Hash) (defaults to: nil)

    Attributes to attach to the span

  • kind (Aws::Telemetry::SpanKind) (defaults to: nil)

    Type of Span

Returns:

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/aws-sdk-core/telemetry/base.rb', line 65

def in_span(name, attributes: nil, kind: nil)
  raise NotImplementedError
end

#start_span(name, with_parent: nil, attributes: nil, kind: nil) ⇒ Aws::Telemetry::SpanBase

Used when a caller wants to manage the activation/deactivation and lifecycle of the Span and its parent manually.

Parameters:

  • name (String)

    Span name

  • with_parent (Object) (defaults to: nil)

    Parent Context

  • attributes (Hash) (defaults to: nil)

    Attributes to attach to the span

  • kind (Aws::Telemetry::SpanKind) (defaults to: nil)

    Type of Span

Returns:

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/aws-sdk-core/telemetry/base.rb', line 51

def start_span(name, with_parent: nil, attributes: nil, kind: nil)
  raise NotImplementedError
end