Sha256: 9a578ec28bb811526fbd3f35eadf28d4ad8e712cd4c702fa39716fdcba89e750
Contents?: true
Size: 426 Bytes
Versions: 6
Compression:
Stored size: 426 Bytes
Contents
module PlainApm module Helpers def plain_apm_context(context = {}) PlainApm::Extensions::Context.context.merge!(context) end def plain_apm_instrument(name, context = {}, &block) sanitized_name = name.gsub(/\W/, "_").gsub(/(?!^)([A-Z])/) { |m| "_#{m}" }.gsub(/_+/, "_").downcase ActiveSupport::Notifications.instrument("#{sanitized_name}.manual_plain_apm", **context, &block) end end end
Version data entries
6 entries across 6 versions & 1 rubygems