Module: OpenTelemetry::Instrumentation::GraphQL::Patches::Dataloader
- Defined in:
- lib/opentelemetry/instrumentation/graphql/patches/dataloader.rb
Overview
Patches GraphQL::Dataloader to propagate context to new fiber
Instance Method Summary collapse
Instance Method Details
#spawn_fiber(&block) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/opentelemetry/instrumentation/graphql/patches/dataloader.rb', line 13 def spawn_fiber(&block) ctx = OpenTelemetry::Context.current super do OpenTelemetry::Context.with_current(ctx, &block) end end |