Sha256: d4bd3a34080a97617921070ddc9a8327bd60110ea43c8d828bc310504608a9ea
Contents?: true
Size: 426 Bytes
Versions: 10
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
10 entries across 10 versions & 1 rubygems