Closed
Bug 1340203
Opened 7 years ago
Closed 7 years ago
Make Django management commands report to New Relic
Categories
(Tree Management :: Treeherder: Infrastructure, defect, P2)
Tree Management
Treeherder: Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
By default the New Relic Python agent doesn't annotate/report on Django management commands, since it doesn't know which are finite-duration (and so suitable) and which are infinite loop commands (and so not; like runserver or read_pulse_jobs): https://docs.newrelic.com/docs/agents/python-agent/supported-features/python-background-tasks#django However this means we have no exception or performance trace handling into them (as noted in bug 1330354 comment 19). At the least we can add the check/migrate/load_initial_data commands, since: (a) they are finite (b) they are run on every deploy, so reporting errors/tracking runtime/performance is useful (we'd have been able to tell how long the autoclassify migrations took - we were trying to figure it out on IRC earlier) For infinite loop commands (eg read_pulse_jobs), we'll need to annotate manually, but that can happen in another bug.
Comment 1•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8838114 -
Flags: review?(james)
Updated•7 years ago
|
Attachment #8838114 -
Flags: review?(james) → review+
Comment 2•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/0f87eb959b2d557172eef19a4b97b0c6400aa013 Bug 1340203 - Make some Django management commands report to New Relic The name of suitable (finite duration) management commands have to be defined in the New Relic config file, since Django management commands are not annotated by default: https://docs.newrelic.com/docs/agents/python-agent/supported-features/python-background-tasks#django We'll likely want to expand this list in the future, particularly if we switch from celery beat schedules and towards the Heroku scheduler in bug 1176492 (since it will run management commands directly, outside of Celery).
Assignee | ||
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•