Sha256: dc0f640cd51950aee4310609a7754336d6cbad2930246efcc1f6c4de511d4463
Contents?: true
Size: 979 Bytes
Versions: 15
Compression:
Stored size: 979 Bytes
Contents
require 'ddtrace/contrib/patcher' require 'ddtrace/ext/app_types' require 'ddtrace/contrib/active_model_serializers/ext' require 'ddtrace/contrib/active_model_serializers/events' module Datadog module Contrib module ActiveModelSerializers # Patcher enables patching of 'active_model_serializers' module. module Patcher include Contrib::Patcher module_function def patched? done?(:active_model_serializers) end def patch do_once(:active_model_serializers) do begin # Subscribe to ActiveModelSerializers events Events.subscribe! rescue StandardError => e Datadog::Tracer.log.error("Unable to apply ActiveModelSerializers integration: #{e}") end end end def get_option(option) Datadog.configuration[:active_model_serializers].get_option(option) end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems