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
ee588795
Unverified
Commit
ee588795
authored
Nov 03, 2017
by
John Eskew
Committed by
GitHub
Nov 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16437 from edx/jeskew/datadog_monitoring_to_appconfig
Move datadog/monitoring startup to AppConfig ready.
parents
6cd33d68
d7bab033
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
35 deletions
+30
-35
cms/envs/common.py
+1
-4
lms/envs/common.py
+1
-4
openedx/core/djangoapps/datadog/apps.py
+20
-15
openedx/core/djangoapps/monitoring/README.rst
+0
-6
openedx/core/djangoapps/monitoring/__init__.py
+0
-0
openedx/core/djangoapps/monitoring/startup.py
+0
-5
openedx/core/djangoapps/util/apps.py
+8
-1
openedx/core/djangoapps/util/signals.py
+0
-0
No files found.
cms/envs/common.py
View file @
ee588795
...
...
@@ -966,7 +966,7 @@ INSTALLED_APPS = [
'eventtracking.django.apps.EventTrackingConfig'
,
# Monitoring
'openedx.core.djangoapps.datadog'
,
'openedx.core.djangoapps.datadog
.apps.DatadogConfig
'
,
# For asset pipelining
'edxmako.apps.EdxMakoConfig'
,
...
...
@@ -1009,9 +1009,6 @@ INSTALLED_APPS = [
# Signals
'openedx.core.djangoapps.signals.apps.SignalConfig'
,
# Monitoring signals
'openedx.core.djangoapps.monitoring'
,
# Course action state
'course_action_state'
,
...
...
lms/envs/common.py
View file @
ee588795
...
...
@@ -2161,7 +2161,7 @@ INSTALLED_APPS = [
'splash'
,
# Monitoring
'openedx.core.djangoapps.datadog'
,
'openedx.core.djangoapps.datadog
.apps.DatadogConfig
'
,
# User API
'rest_framework'
,
...
...
@@ -2202,9 +2202,6 @@ INSTALLED_APPS = [
# Country embargo support
'openedx.core.djangoapps.embargo'
,
# Monitoring functionality
'openedx.core.djangoapps.monitoring'
,
# Course action state
'course_action_state'
,
...
...
openedx/core/djangoapps/datadog/
startup
.py
→
openedx/core/djangoapps/datadog/
apps
.py
View file @
ee588795
"""
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'
)
openedx/core/djangoapps/monitoring/README.rst
deleted
100644 → 0
View file @
6cd33d68
This djangoapp is incorrectly named 'monitoring'.
The name is related to old functionality that used to be a part of this app.
TODO: The current contents of this app should be joined with other generic
platform utilities and renamed appropriately.
openedx/core/djangoapps/monitoring/__init__.py
deleted
100644 → 0
View file @
6cd33d68
openedx/core/djangoapps/monitoring/startup.py
deleted
100644 → 0
View file @
6cd33d68
"""
Registers signal handlers at startup.
"""
# pylint: disable=unused-import
import
openedx.core.djangoapps.monitoring.exceptions
openedx/core/djangoapps/util/apps.py
View file @
ee588795
...
...
@@ -7,8 +7,15 @@ from django.apps import AppConfig
class
UtilConfig
(
AppConfig
):
"""
Let Django know that this is an app with management commands.
Configuration class for the openedx.core.djangoapps.util Django application
"""
label
=
'open_edx_util'
name
=
'openedx.core.djangoapps.util'
verbose_name
=
'Open edX Utilities'
def
ready
(
self
):
"""
Registers signal handlers at startup.
"""
# pylint: disable=unused-import
import
openedx.core.djangoapps.util.signals
openedx/core/djangoapps/
monitoring/exception
s.py
→
openedx/core/djangoapps/
util/signal
s.py
View file @
ee588795
File moved
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