Currently active support only generates consumer spans, we should update this so that a producer span is created when the message is sent. To do this we can
module OpenTelemetry
module Instrumentation
module ActiveSupport
module Producer
def instrument(name, payload = {})
tracer = OpenTelemetry.tracer_provider.tracer(
"opentelemetry-instrumentation-activesupport",
VERSION
)
tracer.in_span("send #{name}", kind: :producer) do
super
end
end
end
end
end
end
And it needs to be installed
ActiveSupport::Notifications.singleton_class.prepend(
OpenTelemetry::Instrumentation::ActiveSupport::Producer
)
Currently active support only generates consumer spans, we should update this so that a producer span is created when the message is sent. To do this we can
And it needs to be installed