Commit Graph

39 Commits

Author SHA1 Message Date
Diana Huang
6572d99e76 Remove all references to datadog from our code. 2019-01-08 15:41:24 -05:00
Eric Fischer
27e309f147 Optimize dictionary combinations 2018-04-25 15:30:17 -04:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Daniel Clemente Laboreo
ce461b1d6e Include forum status in LMS heartbeat service. 2018-01-29 08:53:36 +02:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Toby Lawrence
2acb4a6cad [PERF-386] Utilize ForumsConfig to enable and disable forums.
This specifically enables/disables the underlying comment service client
used to make calls to the service.  When disabled, this client will now
throw an exception which can be propagated upwards so that callers can
make the right decision about how to notify users of the error, or
handle retry, etc etc.
2016-11-03 10:20:19 -04:00
David Ormsbee
255267d42c Create forums config model for adjusting connection timeouts. 2016-06-16 13:50:13 -04:00
wajeeha-khalid
e723fb6aec MA-1930 add result count in paginated endpoints 2016-01-28 13:41:27 +05:00
Braden MacDonald
a8f622af7f Consistently ensure dog_stats_api tags are formatted correctly 2014-10-09 12:35:26 -07:00
Omar Al-Ithawi
4f383353b3 Four Unicode fixes in discussion 2014-10-02 10:56:55 +03:00
Greg Price
dc2342859e Improve handling of bad JSON from comments service
Instead of allowing the JSONDecodeError to escape, raise an error
indicating the request id and containing the first 100 characters
of the response to aid investigation.
2014-06-03 13:34:36 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 12:09:23 -04:00
Calen Pennington
6dd6f0c79d Add more tags to comment_client request metrics
This captures real-time metrics for all of the comment client actions,
segregated by course_id, as well as other small-cardinality fields.

The goal is to be able to detect changes in forum usage, with the goal
of alerting on potential error conditions.
2014-03-28 11:37:44 -04:00
Calen Pennington
ec1b056d82 Use requests library utility method for getting json results 2014-03-28 11:37:43 -04:00
Calen Pennington
cb93b66582 Remove unused *args and **kwargs from perform_request 2014-03-28 11:37:43 -04:00
Greg Price
1c188c9f89 Send language preference to the comments service 2014-02-12 15:25:34 -05:00
Greg Price
5841d460f0 Clean up usage of CS API key 2014-02-12 15:24:30 -05:00
Greg Price
7abaecd8b7 Improve forum error handling
CommentClientError now has sane subclasses that are meaningfully
distinct, and each subclass is handled appropriately. Errors raised by
the requests library are no longer handled by turning them into
CommentClientErrors, since there is no meaningful handling we can do,
and this way we will get more visibility into why errors are occurring.
Also, HTTP status codes from the comments service indicating client
error are correctly passed through to the client.
2013-10-28 11:23:06 -04:00
Greg Price
bd477581b6 Log all comments service requests
Logging the duration of each request will allow us to determine
whether there is a significant difference in the latency reported by
the comments service and that observed by the LMS. Each request will
be assigned a unique identifier to allow correlation of the reported
latency on each end.
2013-10-16 16:31:59 -04:00
Greg Price
62cc9e77bf Use HTTP header for comments service auth
Previously, authentication was done using a URL parameter, which would
appear in various logs. Now, authentication is done more appropriately
with an HTTP header. Note that this requires cs_comments_service commit
cf39aabdd160176ebf206ca19d3ee030161a0b47 or later.
2013-10-11 12:01:44 -04:00
Greg Price
787366fe02 Remove tags for comment client request time histogram in Datadog
According to someone from Datadog, this was generating tags like "knowledgeable_
people_who_put_this_course_together._this_is_harvard._you_can_t_tell_us_there_s_
a_shortage_of_editorial_talent." They say that they can handle tens or hundreds
of unique tags but not thousands. Given that we have a unique URL for each
thread, we can't even use that as a tag. Thus, all tags are removed for now
until we can determine whether there is a useful set of tags with small enough
cardinality. In light of this, I did not investigate why the long tag mentioned
above was being generated.
2013-05-22 14:12:25 -04:00
Nate Hardison
cc7b2942ee Handle Heroku's 503 maintenance mode response
The LMS comment client previously would try to parse the response
as JSON, choke, and return a 500 to the client. Now, the LMS client
displays a message indicating that the forums are down for
maintenance.
2013-05-21 10:03:51 -07:00
Greg Price
87cc4fab5a Add tags to comment service request Datadog timer 2013-05-14 14:49:56 -04:00
Greg Price
c8970cafee Add comment service request time logging to Datadog 2013-05-14 11:32:40 -04:00
Diana Huang
c6f63140a2 Hide the API key during logging. 2013-05-07 16:38:38 -04:00
Calen Pennington
4f555f6480 Merge remote-tracking branch 'origin/master' into feature/cale/xmodule-storage-model
Conflicts:
	cms/djangoapps/contentstore/course_info_model.py
	cms/djangoapps/contentstore/module_info_model.py
	cms/djangoapps/contentstore/tests/factories.py
	cms/djangoapps/contentstore/tests/test_course_settings.py
	cms/djangoapps/contentstore/views.py
	cms/djangoapps/models/settings/course_details.py
	cms/djangoapps/models/settings/course_grading.py
	cms/templates/edit_subsection.html
	common/djangoapps/mitxmako/shortcuts.py
	common/djangoapps/static_replace.py
	common/djangoapps/util/converters.py
	common/djangoapps/xmodule_modifiers.py
	common/lib/xmodule/setup.py
	common/lib/xmodule/xmodule/abtest_module.py
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/discussion_module.py
	common/lib/xmodule/xmodule/error_module.py
	common/lib/xmodule/xmodule/html_module.py
	common/lib/xmodule/xmodule/js/src/video/display.coffee
	common/lib/xmodule/xmodule/mako_module.py
	common/lib/xmodule/xmodule/modulestore/mongo.py
	common/lib/xmodule/xmodule/modulestore/store_utilities.py
	common/lib/xmodule/xmodule/modulestore/xml.py
	common/lib/xmodule/xmodule/modulestore/xml_importer.py
	common/lib/xmodule/xmodule/raw_module.py
	common/lib/xmodule/xmodule/self_assessment_module.py
	common/lib/xmodule/xmodule/seq_module.py
	common/lib/xmodule/xmodule/template_module.py
	common/lib/xmodule/xmodule/tests/__init__.py
	common/lib/xmodule/xmodule/tests/test_export.py
	common/lib/xmodule/xmodule/tests/test_import.py
	common/lib/xmodule/xmodule/video_module.py
	common/lib/xmodule/xmodule/x_module.py
	common/lib/xmodule/xmodule/xml_module.py
	lms/djangoapps/courseware/access.py
	lms/djangoapps/courseware/courses.py
	lms/djangoapps/courseware/grades.py
	lms/djangoapps/courseware/models.py
	lms/djangoapps/courseware/module_render.py
	lms/djangoapps/courseware/tests/tests.py
	lms/djangoapps/courseware/views.py
	lms/djangoapps/django_comment_client/utils.py
	lms/templates/staff_problem_info.html
	lms/templates/video.html
	rakefile
2013-02-07 15:12:30 -05:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Calen Pennington
01411ae66e WIP: Trying to get tests working 2012-12-28 14:48:47 -05:00
Arjun Singh
7ad9b39b98 Merge master 2012-09-10 15:33:59 -07:00
Arjun Singh
242f523d74 Explicit request timeout 2012-09-05 15:09:15 -07:00
Victor Shnayder
f5754f6d1e Add some rudimentary error checking to forum views
[Hopefully fix #34992235]
2012-08-29 13:30:55 -04:00
David Ormsbee
aeee2791ea Merge remote-tracking branch 'rocky/master' into feature/dave/forum_fixes
Conflicts:
	lms/lib/comment_client/utils.py
	lms/templates/discussion/mustache/_content.mustache
2012-08-22 20:00:06 -04:00
David Ormsbee
2e39131b31 Tiny fix to handle when data_or_params isn't passed in 2012-08-22 19:16:28 -04:00
Rocky Duan
4b97e70a4c fixed bug when no data is transmitted otherwise 2012-08-21 17:10:29 -07:00
Rocky Duan
e3a3f7094a added shared key authentication 2012-08-21 15:45:41 -07:00
Rocky Duan
e49226e9e1 some refactor 2012-08-19 00:16:04 -07:00
Rocky Duan
38bdcabe53 reply now works again 2012-08-13 23:23:13 -07:00
Rocky Duan
d6f3492975 replaced comment client sym link 2012-08-12 22:55:55 -07:00