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
65433c9c
Commit
65433c9c
authored
Nov 02, 2017
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move datadog startup.py over to AppConfig::ready
parent
42396560
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
17 deletions
+22
-17
cms/envs/common.py
+1
-1
lms/envs/common.py
+1
-1
openedx/core/djangoapps/datadog/apps.py
+20
-15
No files found.
cms/envs/common.py
View file @
65433c9c
...
...
@@ -963,7 +963,7 @@ INSTALLED_APPS = [
'eventtracking.django.apps.EventTrackingConfig'
,
# Monitoring
'openedx.core.djangoapps.datadog'
,
'openedx.core.djangoapps.datadog
.apps.DatadogConfig
'
,
# For asset pipelining
'edxmako.apps.EdxMakoConfig'
,
...
...
lms/envs/common.py
View file @
65433c9c
...
...
@@ -2158,7 +2158,7 @@ INSTALLED_APPS = [
'splash'
,
# Monitoring
'openedx.core.djangoapps.datadog'
,
'openedx.core.djangoapps.datadog
.apps.DatadogConfig
'
,
# User API
'rest_framework'
,
...
...
openedx/core/djangoapps/datadog/
startup
.py
→
openedx/core/djangoapps/datadog/
apps
.py
View file @
65433c9c
"""
Start up initialization of datadog.
Configuration for datadog Django app
"""
from
django.apps
import
AppConfig
from
django.conf
import
settings
from
dogapi
import
dog_http_api
,
dog_stats_api
def
run
(
):
class
DatadogConfig
(
AppConfig
):
"""
Initialize connection to datadog during django startup.
Can be configured using a dictionary named DATADOG in the django
project settings.
Configuration class for datadog Django app
"""
name
=
'openedx.core.djangoapps.datadog'
verbose_name
=
"Datadog"
def
ready
(
self
):
"""
Initialize connection to datadog during django startup.
# By default use the statsd agent
options
=
{
'statsd'
:
True
}
Configure using DATADOG dictionary in the django project settings.
"""
# By default use the statsd agent
options
=
{
'statsd'
:
True
}
if
hasattr
(
settings
,
'DATADOG'
):
options
.
update
(
settings
.
DATADOG
)
if
hasattr
(
settings
,
'DATADOG'
):
options
.
update
(
settings
.
DATADOG
)
# Not all arguments are documented.
# Look at the source code for details.
dog_stats_api
.
start
(
**
options
)
# Not all arguments are documented.
# Look at the source code for details.
dog_stats_api
.
start
(
**
options
)
dog_http_api
.
api_key
=
options
.
get
(
'api_key'
)
dog_http_api
.
api_key
=
options
.
get
(
'api_key'
)
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