Module: Riffer::Tracing::Null

Extended by:
Null
Included in:
Null
Defined in:
lib/riffer/tracing/null.rb

Overview

No-op tracing backend, used when OTEL is unavailable or tracing is disabled.

Defined Under Namespace

Classes: Span

Constant Summary collapse

SPAN =

: Riffer::Tracing::Null::Span

Span.new.freeze

Instance Method Summary collapse

Instance Method Details

#current_contextObject

Returns nil; there is no trace context without OTEL. – : () -> nil



51
52
53
# File 'lib/riffer/tracing/null.rb', line 51

def current_context
  nil
end

#in_span(_name) {|SPAN| ... } ⇒ Object

Yields the no-op span, ignoring all span options. – : [R] (String, **untyped) { (Riffer::Tracing::Null::Span) -> R } -> R

Yields:



44
45
46
# File 'lib/riffer/tracing/null.rb', line 44

def in_span(_name, **)
  yield SPAN
end

#with_context(_context) ⇒ Object

Yields immediately; there is no context to attach. – : [R] (untyped) { () -> R } -> R



58
59
60
# File 'lib/riffer/tracing/null.rb', line 58

def with_context(_context)
  yield
end