Class: Rage::Telemetry::Spans::BroadcastCableStream

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

Overview

The cable.stream.broadcast span wraps the process of broadcasting a message to a Rage::Cable stream.

This span is started when Rage::Cable.broadcast is called, and ends when the broadcast operation is complete. See handle for the list of arguments passed to handler methods.

Class Method Summary collapse

Class Method Details

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

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

Parameters:

  • id ("cable.stream.broadcast")

    ID of the span

  • name ("Rage::Cable.broadcast")

    human-readable name of the operation

  • stream (String)

    the name of the stream to which the message is being broadcasted

Yield Returns:



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

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