Sha256: f898c5b7f0e11b0bf73e502f66ef75a06ac069236c78dad4acda6be9be5e47bc

Contents?: true

Size: 542 Bytes

Versions: 13

Compression:

Stored size: 542 Bytes

Contents

# frozen_string_literal: true

module Labkit
  module Tracing
    module Sidekiq
      # 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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gitlab-labkit-0.9.1 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.9.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.8.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.7.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.6.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.5.2 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.5.1 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.5.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.4.2 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.4.1 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.4.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.3.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb
gitlab-labkit-0.2.0 lib/labkit/tracing/sidekiq/sidekiq_common.rb