Class: Rage::Telemetry::Spans::ProcessSSEStream

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

Overview

The sse.stream.process span wraps the processing of an SSE stream.

This span starts when a connection is opened and ends when the stream is finished. See handle for the list of arguments passed to handler methods.

Class Method Summary collapse

Class Method Details

.handle(id:, name:, env:, type:) ⇒ 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 "sse.stream.process", with: :my_handler

  def my_handler(id:, name:, env:, type:)
    yield
  end
end

Parameters:

  • id ("sse.stream.process")

    ID of the span

  • name ("SSE.process")

    human-readable name of the operation

  • env (Hash)

    the Rack environment associated with the connection

  • type (:stream, :single, :manual)

    the type of the SSE stream

Yield Returns:



17
18
# File 'lib/rage/telemetry/spans/process_sse_stream.rb', line 17

def handle(id:, name:, env:, type:)
end