Module: Datadog::AppSec::Contrib::Devise::Configuration
- Defined in:
- lib/datadog/appsec/contrib/devise/configuration.rb
Overview
A temporary configuration module to accomodate new RFC changes. NOTE: DEV-3 Remove module
Constant Summary collapse
- TRACK_USER_EVENTS_CONVERSION_RULES =
{ AppSec::Configuration::Settings::SAFE_TRACK_USER_EVENTS_MODE => AppSec::Configuration::Settings::ANONYMIZATION_AUTO_USER_INSTRUMENTATION_MODE, AppSec::Configuration::Settings::EXTENDED_TRACK_USER_EVENTS_MODE => AppSec::Configuration::Settings::IDENTIFICATION_AUTO_USER_INSTRUMENTATION_MODE }.freeze
Class Method Summary collapse
-
.auto_user_instrumentation_enabled? ⇒ Boolean
NOTE: DEV-3 Replace method use with ‘auto_user_instrumentation.enabled?`.
-
.auto_user_instrumentation_mode ⇒ Object
NOTE: DEV-3 Replace method use with ‘auto_user_instrumentation.mode`.
Class Method Details
.auto_user_instrumentation_enabled? ⇒ Boolean
NOTE: DEV-3 Replace method use with ‘auto_user_instrumentation.enabled?`
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/datadog/appsec/contrib/devise/configuration.rb', line 20 def auto_user_instrumentation_enabled? appsec = Datadog.configuration.appsec appsec.auto_user_instrumentation.mode unless appsec.auto_user_instrumentation.[:mode].default_precedence? return appsec.auto_user_instrumentation.enabled? end appsec.track_user_events.enabled end |
.auto_user_instrumentation_mode ⇒ Object
NOTE: DEV-3 Replace method use with ‘auto_user_instrumentation.mode`
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/datadog/appsec/contrib/devise/configuration.rb', line 32 def auto_user_instrumentation_mode appsec = Datadog.configuration.appsec # NOTE: Reading both to trigger precedence set appsec.auto_user_instrumentation.mode appsec.track_user_events.mode if !appsec.track_user_events.[:mode].default_precedence? && appsec.auto_user_instrumentation.[:mode].default_precedence? return TRACK_USER_EVENTS_CONVERSION_RULES.fetch( appsec.track_user_events.mode, appsec.auto_user_instrumentation.mode ) end appsec.auto_user_instrumentation.mode end |