Sha256: a57a4d9a2e57ee31aa13bd4fefaa314df0dc3270869bc71d980c1e2b332dae53
Contents?: true
Size: 1.96 KB
Versions: 12
Compression:
Stored size: 1.96 KB
Contents
# typed: true module Datadog module Tracing module Contrib module Sidekiq module ServerInternalTracer # Trace when Sidekiq checks to see if there are scheduled jobs that need to be worked # https://github.com/mperham/sidekiq/wiki/Scheduled-Jobs module ScheduledPoller 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(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 private def wait configuration = Datadog.configuration.tracing[:sidekiq] Datadog::Tracing.trace(Ext::SPAN_SCHEDULED_WAIT, service: configuration[:service_name]) do |span| span.span_type = Datadog::Tracing::Metadata::Ext::AppTypes::TYPE_WORKER 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_WAIT) # 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 end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems