Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cd802d8e
Commit
cd802d8e
authored
Mar 08, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add datadog metrics capture around heartbeat timing
parent
5644d081
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
1 deletions
+23
-1
cms/envs/aws.py
+4
-0
cms/one_time_startup.py
+6
-0
cms/urls.py
+1
-0
common/djangoapps/heartbeat/views.py
+2
-1
common/djangoapps/student/management/commands/pearson_transfer.py
+1
-0
lms/one_time_startup.py
+6
-0
lms/urls.py
+3
-0
No files found.
cms/envs/aws.py
View file @
cd802d8e
...
...
@@ -62,3 +62,6 @@ AWS_SECRET_ACCESS_KEY = AUTH_TOKENS["AWS_SECRET_ACCESS_KEY"]
DATABASES
=
AUTH_TOKENS
[
'DATABASES'
]
MODULESTORE
=
AUTH_TOKENS
[
'MODULESTORE'
]
CONTENTSTORE
=
AUTH_TOKENS
[
'CONTENTSTORE'
]
# Datadog for events!
DATADOG_API
=
AUTH_TOKENS
.
get
(
"DATADOG_API"
)
\ No newline at end of file
cms/one_time_startup.py
0 → 100644
View file @
cd802d8e
from
dogapi
import
dog_http_api
,
dog_stats_api
from
django.conf
import
settings
if
hasattr
(
settings
,
'DATADOG_API'
):
dog_http_api
.
api_key
=
settings
.
DATADOG_API
dog_stats_api
.
start
(
api_key
=
settings
.
DATADOG_API
,
statsd
=
True
)
cms/urls.py
View file @
cd802d8e
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
include
,
url
from
.
import
one_time_startup
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
...
...
common/djangoapps/heartbeat/views.py
View file @
cd802d8e
...
...
@@ -2,8 +2,9 @@ import json
from
datetime
import
datetime
from
django.http
import
HttpResponse
from
xmodule.modulestore.django
import
modulestore
from
dogapi
import
dog_stats_api
@dog_stats_api.timed
(
'edxapp.heartbeat'
)
def
heartbeat
(
request
):
"""
Simple view that a loadbalancer can check to verify that the app is up
...
...
common/djangoapps/student/management/commands/pearson_transfer.py
View file @
cd802d8e
...
...
@@ -10,6 +10,7 @@ import paramiko
import
boto
dog_http_api
.
api_key
=
settings
.
DATADOG_API
dog_stats_api
.
start
(
api_key
=
settings
.
DATADOG_API
,
statsd
=
True
)
class
Command
(
BaseCommand
):
...
...
lms/one_time_startup.py
0 → 100644
View file @
cd802d8e
from
dogapi
import
dog_http_api
,
dog_stats_api
from
django.conf
import
settings
if
hasattr
(
settings
,
'DATADOG_API'
):
dog_http_api
.
api_key
=
settings
.
DATADOG_API
dog_stats_api
.
start
(
api_key
=
settings
.
DATADOG_API
,
statsd
=
True
)
lms/urls.py
View file @
cd802d8e
...
...
@@ -3,6 +3,9 @@ from django.conf.urls import patterns, include, url
from
django.contrib
import
admin
from
django.conf.urls.static
import
static
from
django.views.generic
import
RedirectView
from
.
import
one_time_startup
import
django.contrib.auth.views
# Uncomment the next two lines to enable the admin:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment