Sha256: 20ec2ce75c40b6d792cd6f34b4c802453e69eead6b5ae73881b07efeaed71b82

Contents?: true

Size: 602 Bytes

Versions: 12

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Labkit
  module Middleware
    module Sidekiq
      module Tracing
        # SidekiqCommon is a mixin for the sidekiq middleware components
        module SidekiqCommon
          def tags_from_job(job, kind)
            {
              "component" => "sidekiq",
              "span.kind" => kind,
              "sidekiq.queue" => job["queue"],
              "sidekiq.jid" => job["jid"],
              "sidekiq.retry" => job["retry"].to_s,
              "sidekiq.args" => job["args"]&.join(", "),
            }
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gitlab-labkit-0.13.5 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.13.4 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.13.3 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.13.2 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.13.1 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.13.0 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.12.2 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.12.1 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.12.0 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.11.0 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.10.1 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb
gitlab-labkit-0.10.0 lib/labkit/middleware/sidekiq/tracing/sidekiq_common.rb