Skip to content

Commit

Permalink
refacotr
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin committed Oct 10, 2023
1 parent 4473c5c commit 7159983
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ def subscribe
tracer = Instrumentation.instance.tracer
mapper = Mappers::Attribute.new
config = ActiveJob::Instrumentation.instance.config
parent_span_provider = OpenTelemetry::Instrumentation::ActiveJob

default_handler = Handlers::Default.new(tracer, mapper, config)
enqueue_handler = Handlers::Enqueue.new(tracer, mapper, config)
perform_handler = Handlers::Perform.new(tracer, mapper, config)
# TODO, use delegation instead of inheritance
default_handler = Handlers::Default.new(tracer, parent_span_provider, mapper, config)
enqueue_handler = Handlers::Enqueue.new(tracer, parent_span_provider, mapper, config)
perform_handler = Handlers::Perform.new(tracer, parent_span_provider, mapper, config)

handlers_by_pattern = {
'enqueue' => enqueue_handler,
Expand Down

0 comments on commit 7159983

Please sign in to comment.