Module: OpenTelemetry::Instrumentation::Rage::Handlers::Fiber::Patch

Defined in:
lib/opentelemetry/instrumentation/rage/handlers/fiber.rb

Overview

Save the current OpenTelemetry context into Fiber local storage. Application-level fibers spawned via ‘Fiber.schedule` will automatically inherit the storage.

Instance Method Summary collapse

Instance Method Details

#scheduleObject



16
17
18
19
# File 'lib/opentelemetry/instrumentation/rage/handlers/fiber.rb', line 16

def schedule(&)
  ::Fiber[:__rage_otel_context] = OpenTelemetry::Context.current
  super
end