Remove all references to datadog from our code.

This commit is contained in:
Diana Huang
2018-12-11 13:37:19 -05:00
parent 577315f2a7
commit 6572d99e76
44 changed files with 114 additions and 614 deletions

View File

@@ -1,32 +0,0 @@
"""
Configuration for datadog Django app
"""
from django.apps import AppConfig
from django.conf import settings
from dogapi import dog_http_api, dog_stats_api
class DatadogConfig(AppConfig):
"""
Configuration class for datadog Django app
"""
name = 'openedx.core.djangoapps.datadog'
verbose_name = "Datadog"
def ready(self):
"""
Initialize connection to datadog during django startup.
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)
# 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')

View File

@@ -1,13 +1,11 @@
"""
Views for verifying the health (heartbeat) of the app.
"""
from dogapi import dog_stats_api
from util.json_request import JsonResponse
from .runchecks import runchecks
@dog_stats_api.timed('edxapp.heartbeat')
def heartbeat(request):
"""
Simple view that a loadbalancer can check to verify that the app is up. Returns a json doc

View File

@@ -5,11 +5,9 @@ Django Celery tasks for service status app
import time
from djcelery import celery
from dogapi import dog_stats_api
@celery.task
@dog_stats_api.timed('status.service.celery.pong')
def delayed_ping(value, delay):
"""A simple tasks that replies to a message after a especified amount
of seconds.

View File

@@ -8,7 +8,6 @@ import time
from celery.exceptions import TimeoutError
from django.http import HttpResponse
from djcelery import celery
from dogapi import dog_stats_api
from openedx.core.djangoapps.service_status.tasks import delayed_ping
@@ -20,7 +19,6 @@ def index(_):
return HttpResponse()
@dog_stats_api.timed('status.service.celery.status')
def celery_status(_):
"""
A view that returns Celery stats
@@ -30,7 +28,6 @@ def celery_status(_):
content_type="application/json")
@dog_stats_api.timed('status.service.celery.ping')
def celery_ping(_):
"""
A Simple view that checks if Celery can process a simple task

View File

@@ -6,7 +6,6 @@ import datetime
import json
import logging
import dogstats_wrapper as dog_stats_api
from django.conf import settings
from django.contrib.auth import login as django_login
from django.contrib.auth.models import User
@@ -193,8 +192,6 @@ def create_account_with_params(request, params):
except Exception: # pylint: disable=broad-except
log.exception("Enable discussion notifications failed for user {id}.".format(id=user.id))
dog_stats_api.increment("common.student.account_created")
_track_user_registration(user, profile, params, third_party_provider)
# Announce registration