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:
Gabe Mulley
2013-09-10 17:25:30 -04:00
parent b6761498a3
commit 761a4dcc97
6 changed files with 78 additions and 4 deletions

View File

@@ -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.

View File

@@ -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']