Module: OpenTelemetry::Instrumentation::RubyKafka::Patches::AsyncProducer
- Defined in:
- lib/opentelemetry/instrumentation/ruby_kafka/patches/async_producer.rb
Overview
The AsyncProducer module contains the instrumentation patch the AsyncProducer#produce method
Instance Method Summary collapse
Instance Method Details
#__otel_merge_options!(**options) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/opentelemetry/instrumentation/ruby_kafka/patches/async_producer.rb', line 14 def (**) ||= { headers: {} } # The propagator mutates the carrier (first positional argument), so we need to set headers to empty hash so # that there's something to mutate [:headers] = {} unless [:headers] OpenTelemetry.propagation.inject([:headers]) end |
#produce(value, topic:, **options) ⇒ Object
9 10 11 12 |
# File 'lib/opentelemetry/instrumentation/ruby_kafka/patches/async_producer.rb', line 9 def produce(value, topic:, **) = (**) super end |