Class: Rage::Telemetry::Spans::SpawnFiber

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

Overview

The core.fiber.spawn span tracks the scheduling and processing of application-level fibers created via Fiber.schedule.

This span is started when a fiber begins processing and ends when the fiber has completed processing. See handle for the list of arguments passed to handler methods.

Class Method Summary collapse

Class Method Details

.handle(id:, name:, parent:) ⇒ 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.spawn", with: :my_handler

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

Parameters:

  • id ("core.fiber.spawn")

    ID of the span

  • name ("Fiber.schedule")

    human-readable name of the operation

  • parent (Fiber)

    the parent fiber that the current fiber was scheduled from

Yield Returns:



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

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