Skip to content

Commit

Permalink
Replace track_user_events usage with new setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Strech committed Feb 6, 2025
1 parent 8f00db5 commit 6d78f43
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,26 @@ def create
yield resource if block_given?
end
end

private

# NOTE: DEV-3 replace method use with `auto_user_instrumentation.enabled?`
def auto_user_instrumentation_enabled?
Datadog.configuration.appsec.auto_user_instrumentation.enabled? &&
Datadog.configuration.appsec.track_user_events.enabled
end

# NOTE: DEV-3 replace method use with `auto_user_instrumentation.mode`
def auto_user_instrumentation_mode
case Datadog.configuration.appsec.track_user_events.mode
when Configuration::Settings::SAFE_TRACK_USER_EVENTS_MODE
Configuration::Settings::ANONYMIZATION_AUTO_USER_INSTRUMENTATION_MODE
when Configuration::Settings::EXTENDED_TRACK_USER_EVENTS_MODE
Configuration::Settings::IDENTIFICATION_AUTO_USER_INSTRUMENTATION_MODE
else
Datadog.configuration.appsec.auto_user_instrumentation.mode
end
end
end
end
end
Expand Down

0 comments on commit 6d78f43

Please sign in to comment.