File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
lib/datadog/appsec/contrib/devise/patcher Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,26 @@ def create
4646 yield resource if block_given?
4747 end
4848 end
49+
50+ private
51+
52+ # NOTE: DEV-3 replace method use with `auto_user_instrumentation.enabled?`
53+ def auto_user_instrumentation_enabled?
54+ Datadog . configuration . appsec . auto_user_instrumentation . enabled? &&
55+ Datadog . configuration . appsec . track_user_events . enabled
56+ end
57+
58+ # NOTE: DEV-3 replace method use with `auto_user_instrumentation.mode`
59+ def auto_user_instrumentation_mode
60+ case Datadog . configuration . appsec . track_user_events . mode
61+ when Configuration ::Settings ::SAFE_TRACK_USER_EVENTS_MODE
62+ Configuration ::Settings ::ANONYMIZATION_AUTO_USER_INSTRUMENTATION_MODE
63+ when Configuration ::Settings ::EXTENDED_TRACK_USER_EVENTS_MODE
64+ Configuration ::Settings ::IDENTIFICATION_AUTO_USER_INSTRUMENTATION_MODE
65+ else
66+ Datadog . configuration . appsec . auto_user_instrumentation . mode
67+ end
68+ end
4969 end
5070 end
5171 end
You can’t perform that action at this time.
0 commit comments