Sha256: dec17c056c15780785e29a14bbb1422a11e9f37ef0f6b5017023b2eccb07d52b
Contents?: true
Size: 845 Bytes
Versions: 12
Compression:
Stored size: 845 Bytes
Contents
# frozen_string_literal: true module WCC::Contentful module Instrumentation extend ActiveSupport::Concern def _instrumentation_event_prefix @_instrumentation_event_prefix ||= # WCC::Contentful => contentful.wcc '.' + (is_a?(Class) || is_a?(Module) ? self : self.class) .name.parameterize.split('-').reverse.join('.') end included do protected def _instrument(name, payload = {}, &block) name += _instrumentation_event_prefix (@_instrumentation ||= WCC::Contentful::Services.instance.instrumentation) .instrument(name, payload, &block) end end class << self def instrument(name, payload = {}, &block) WCC::Contentful::Services.instance .instrumentation.instrument(name, payload, &block) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems