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
6de25bf5
Commit
6de25bf5
authored
Sep 04, 2013
by
Carlos Andrés Rocha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monitor event tracking time by backend using statsd
parent
fbc243db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
common/djangoapps/track/tracker.py
+7
-2
No files found.
common/djangoapps/track/tracker.py
View file @
6de25bf5
...
...
@@ -21,6 +21,8 @@ below::
import
inspect
from
importlib
import
import_module
from
dogapi
import
dog_stats_api
from
django.conf
import
settings
from
track.backends
import
BaseBackend
...
...
@@ -81,14 +83,17 @@ def _instantiate_backend_from_name(name, options):
return
backend
@dog_stats_api.timed
(
'track.send'
)
def
send
(
event
):
"""
Send an event object to all the initialized backends.
"""
for
backend
in
backends
.
itervalues
():
backend
.
send
(
event
)
dog_stats_api
.
increment
(
'track.send.count'
)
for
name
,
backend
in
backends
.
iteritems
():
with
dog_stats_api
.
timer
(
'track.send.backend.{0}'
.
format
(
name
)):
backend
.
send
(
event
)
_initialize_backends_from_django_settings
()
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