Sha256: c0c423219745b8009574a3ffc3b0d052f1b9b3217745f9d9fbffaa57d8f839f3
Contents?: true
Size: 1.82 KB
Versions: 12
Compression:
Stored size: 1.82 KB
Contents
# typed: true module Datadog module Tracing module Contrib module Sidekiq module ServerInternalTracer # Trace when a Sidekiq process has a heartbeat module Heartbeat def stop configuration = Datadog.configuration.tracing[:sidekiq] Datadog::Tracing.trace(Ext::SPAN_STOP, 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_STOP) # 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 heartbeat configuration = Datadog.configuration.tracing[:sidekiq] Datadog::Tracing.trace(Ext::SPAN_HEARTBEAT, 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_HEARTBEAT) # 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