Sha256: ae9e6ad31e1b9d885f5571c02584ca453f64af9feed89c9015075164730ff64f

Contents?: true

Size: 531 Bytes

Versions: 5

Compression:

Stored size: 531 Bytes

Contents

# frozen_string_literal: true

require "active_support/all"

module Labkit
  module Tracing
    # TracingCommon is a mixin for providing instrumentation
    # functionality for the instrumentation classes based on
    # ActiveSupport::Notifications
    module TracingCommon
      extend ::ActiveSupport::Concern

      class_methods do
        def create_unsubscriber(subscriptions)
          -> { subscriptions.each { |subscriber| ::ActiveSupport::Notifications.unsubscribe(subscriber) } }
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gitlab-labkit-0.16.2 lib/labkit/tracing/tracing_common.rb
gitlab-labkit-0.16.1 lib/labkit/tracing/tracing_common.rb
gitlab-labkit-0.16.0 lib/labkit/tracing/tracing_common.rb
gitlab-labkit-0.15.0 lib/labkit/tracing/tracing_common.rb
gitlab-labkit-0.14.0 lib/labkit/tracing/tracing_common.rb