Module: Riffer::Tracing::NoOp

Extended by:
NoOp
Included in:
Riffer, NoOp
Defined in:
lib/riffer/tracing/no_op.rb

Overview

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

Defined Under Namespace

Classes: Span

Constant Summary collapse

SPAN =

Signature:

  • Riffer::Tracing::NoOp::Span

Span.new.freeze

Instance Method Summary collapse

Instance Method Details

#current_contextObject

Returns nil; there is no trace context without OTEL.

Signature:

  • () -> nil



47
48
49
# File 'lib/riffer/tracing/no_op.rb', line 47

def current_context
  nil
end

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

Yields the no-op span, ignoring all span options.

Signature:

  • [R] (String, **untyped) { (Riffer::Tracing::NoOp::Span) -> R } -> R

Yields:



40
41
42
# File 'lib/riffer/tracing/no_op.rb', line 40

def in_span(_name, **)
  yield SPAN
end

#with_context(_context) ⇒ Object

Yields immediately; there is no context to attach.

Signature:

  • [R] (untyped) { () -> R } -> R



54
55
56
# File 'lib/riffer/tracing/no_op.rb', line 54

def with_context(_context)
  yield
end