Module: Datadog::Tracing::Contrib::Sidekiq::ServerInternalTracer::ScheduledPoller
- Defined in:
- lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_poller.rb
Overview
Trace when Sidekiq checks to see if there are scheduled jobs that need to be worked github.com/mperham/sidekiq/wiki/Scheduled-Jobs
Instance Method Summary collapse
Instance Method Details
#enqueue ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_poller.rb', line 11 def enqueue configuration = Datadog.configuration.tracing[:sidekiq] Datadog::Tracing.trace(Ext::SPAN_SCHEDULED_PUSH, service: configuration[:service_name]) do |span| span.span_type = Datadog::Tracing::Metadata::Ext::AppTypes::TYPE_WORKER span.set_tag(Contrib::Ext::Messaging::TAG_SYSTEM, Ext::TAG_COMPONENT) span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT, Ext::TAG_COMPONENT) span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_SCHEDULED_PUSH) # Set analytics sample rate if Contrib::Analytics.enabled?(configuration[:analytics_enabled]) Contrib::Analytics.set_sample_rate(span, configuration[:analytics_sample_rate]) end super end end |