Sha256: e0bd694e27abc2d8524351806e2bfc546830ea75110d17b00f8eebc0c48a909a

Contents?: true

Size: 320 Bytes

Versions: 3

Compression:

Stored size: 320 Bytes

Contents

# frozen_string_literal: true

module ForemanSupervisoryAuthority
  module SetElasticApmContext
    extend ActiveSupport::Concern

    included do
      before_action :set_elastic_apm_context
    end

    private

    def set_elastic_apm_context
      User.current && ElasticAPM.set_user(User.current)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_supervisory_authority-0.2.0 app/controllers/concerns/foreman_supervisory_authority/set_elastic_apm_context.rb
foreman_supervisory_authority-0.0.2 app/controllers/concerns/foreman_supervisory_authority/set_elastic_apm_context.rb
foreman_supervisory_authority-0.0.1 app/controllers/concerns/foreman_supervisory_authority/set_elastic_apm_context.rb