Class: Rage::Telemetry::Spans::AwaitFiber

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/telemetry/spans/await_fiber.rb

Overview

The core.fiber.await span wraps the processing of the Fiber.await call.

This span is started when a fiber begins awaiting other fibers, and ends when all awaited fibers have completed. See handle for the list of arguments passed to handler methods.

Class Method Summary collapse

Class Method Details

.handle(id:, name:, fibers:) ⇒ Object

Note:

Rage automatically detects which parameters your handler method accepts and only passes those parameters. You can omit any of the parameters described here.

Examples:

class MyTelemetryHandler < Rage::Telemetry::Handler
  handle "core.fiber.await", with: :my_handler

  def my_handler(id:, name:, fibers:)
    yield
  end
end

Parameters:

  • id ("core.fiber.await")

    ID of the span

  • name ("Fiber.await")

    human-readable name of the operation

  • fibers (Array<Fiber>)

    the fibers the current fiber is awaiting

Yield Returns:



16
17
# File 'lib/rage/telemetry/spans/await_fiber.rb', line 16

def handle(id:, name:, fibers:)
end