Make URL patterns to exclude from tracking configurable
* Add unit test coverage for this "exclusion from tracking" logic * Exclude based on regex match instead of raw string comparison * Exclude heartbeat requests from tracking
This commit is contained in:
@@ -127,6 +127,10 @@ LOGGING = get_logger_config(LOG_DIR,
|
||||
#theming start:
|
||||
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'edX')
|
||||
|
||||
# Event Tracking
|
||||
if "TRACKING_IGNORE_URL_PATTERNS" in ENV_TOKENS:
|
||||
TRACKING_IGNORE_URL_PATTERNS = ENV_TOKENS.get("TRACKING_IGNORE_URL_PATTERNS")
|
||||
|
||||
|
||||
################ SECURE AUTH ITEMS ###############################
|
||||
# Secret things: passwords, access keys, etc.
|
||||
|
||||
@@ -404,3 +404,7 @@ TRACKING_BACKENDS = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# We're already logging events, and we don't want to capture user
|
||||
# names/passwords. Heartbeat events are likely not interesting.
|
||||
TRACKING_IGNORE_URL_PATTERNS = [r'^/event', r'^/login', r'^/heartbeat']
|
||||
|
||||
Reference in New Issue
Block a user