Commit Graph

21 Commits

Author SHA1 Message Date
Jawayria
62bc555817 Applied pylint-amnesty to track 2021-02-03 13:10:42 +05:00
Robert Raposa
186f5fbce2 track: catch unhandled exceptions and add monitoring
Add the following monitoring custom attributes:
- segment_event_name
- segment_event_source
- segment_unexpected_context
- segment_unexpected_data

Also, this explicitly raises a validation error whenever context is a
string instead of throwing a vague TypeError.

Related to LEARNER-8034
2020-11-18 21:45:00 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
brianhw
89169443ad Handle more kinds of bad data in segment events. (#25506) 2020-11-03 15:04:05 -05:00
stvn
5eaa532046 Fix segment_context key error
This is one of the frequent TNL errors.
2020-07-20 17:26:38 -07:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Anthony Wee
a0bb7e572d INCR-125: Run python-modernize on common/djangoapps/track/views and migrations (#20425)
* INCR-125: Run python-modernize on common/djangoapps/track/views and migrations

* isort
2019-05-07 14:26:57 -04:00
Awais Jibran
ddd69db7cf Handle string datetime with datetime parser. 2018-12-11 13:24:10 -05:00
Kyle McCormick
fade4a10af Implement event for forum thread views
EDUCATOR-341
2017-07-11 12:42:49 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Nimisha Asthagiri
a5574792fb Fix mobile Warning errors in tracking logs. 2016-02-09 13:22:15 -05:00
Bill DeRusha
c721ff5a82 Replace SEGMENT_IO_LMS & SEGMENT_IO_LMS_KEY with single key SEGMENT_KEY 2015-09-24 11:49:03 -04:00
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Nimisha Asthagiri
ad7a67da2b Update segment.io shim for mobile event syntax change. 2014-12-19 12:39:39 -05:00
Nimisha Asthagiri
a6003991a5 MA-157 Mobile analytics end-to-end.
Move app-generated context back into properties.
Ignore BI events through segment's webhook.
Ignore events without Data in Properties.
2014-12-09 18:44:06 -05:00
Nimisha Asthagiri
07d50ba7a1 MA-90 Update Analytics Shim to match new mobile requirements. 2014-11-13 18:18:57 -05:00
Gabe Mulley
821c97fbb4 Implement shim for mobile video events.
This PR addresses the following issues:

1) All requests return a 200 OK unless there is an authorization failure. This is deliberate in case the secret key is compromised.
2) Push all of the nasty logic necessary to generate compatible video events into the LMS instead of trying to do that mapping on the mobile devices.
3) Stop using the deprecated "action" field in the segment.io event. According to their support team this field should not be used anymore and is just around for backwards compatibility reasons.

Fixes: AN-3818
2014-11-03 14:12:07 -05:00
Gabe Mulley
5643101ad1 Small changes to the segment.io event handler 2014-10-09 13:25:20 -04:00
Gabe Mulley
7900e8d346 Add event tracking endpoint to be called by segment.io 2014-09-09 07:25:54 -04:00