Skip to content

Commit

Permalink
Merge pull request openedx#33929 from openedx/feanil/remove_datadog_c…
Browse files Browse the repository at this point in the history
…ruft

chore: Remove old datadog related settings.
  • Loading branch information
Feanil Patel authored Dec 14, 2023
2 parents f55a42a + 5ec8737 commit d7b7f70
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 28 deletions.
8 changes: 0 additions & 8 deletions cms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,6 @@ def get_env_setting(setting):
# Configure an API auth token at (blockstore URL)/admin/authtoken/token/
BLOCKSTORE_API_AUTH_TOKEN = AUTH_TOKENS.get('BLOCKSTORE_API_AUTH_TOKEN', None)

# Datadog for events!
DATADOG = AUTH_TOKENS.get("DATADOG", {})
DATADOG.update(ENV_TOKENS.get("DATADOG", {}))

# TODO: deprecated (compatibility with previous settings)
if 'DATADOG_API' in AUTH_TOKENS:
DATADOG['api_key'] = AUTH_TOKENS['DATADOG_API']

# Celery Broker
CELERY_ALWAYS_EAGER = ENV_TOKENS.get("CELERY_ALWAYS_EAGER", False)
CELERY_BROKER_TRANSPORT = ENV_TOKENS.get("CELERY_BROKER_TRANSPORT", "")
Expand Down
3 changes: 0 additions & 3 deletions lms/djangoapps/courseware/user_state_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ class DjangoXBlockUserStateClient(XBlockUserStateClient):
even though the actual stored state in the database will be ``"{}"``).
"""

# Use this sample rate for DataDog events.
API_DATADOG_SAMPLE_RATE = 0.1

class ServiceUnavailable(XBlockUserStateClient.ServiceUnavailable):
"""
This error is raised if the service backing this client is currently unavailable.
Expand Down
8 changes: 0 additions & 8 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,14 +525,6 @@ def get_env_setting(setting):
# Configure an API auth token at (blockstore URL)/admin/authtoken/token/
BLOCKSTORE_API_AUTH_TOKEN = AUTH_TOKENS.get('BLOCKSTORE_API_AUTH_TOKEN', None)

# Datadog for events!
DATADOG = AUTH_TOKENS.get("DATADOG", {})
DATADOG.update(ENV_TOKENS.get("DATADOG", {}))

# TODO: deprecated (compatibility with previous settings)
if 'DATADOG_API' in AUTH_TOKENS:
DATADOG['api_key'] = AUTH_TOKENS['DATADOG_API']

# Analytics API
ANALYTICS_API_KEY = AUTH_TOKENS.get("ANALYTICS_API_KEY", ANALYTICS_API_KEY)
ANALYTICS_API_URL = ENV_TOKENS.get("ANALYTICS_API_URL", ANALYTICS_API_URL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ class Thread(models.Model):
'close_reason_code', 'edit_reason_code', 'closing_user_id', 'editing_user_id',
]

# metric_tag_fields are used by Datadog to record metrics about the model
metric_tag_fields = [
'course_id', 'group_id', 'pinned', 'closed', 'anonymous', 'anonymous_to_peers',
'endorsed', 'read',
]

# initializable_fields are sent in POST requests
initializable_fields = updatable_fields + ['thread_type', 'context']

Expand Down
3 changes: 0 additions & 3 deletions xmodule/x_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
XMODULE_DURATION_METRIC_NAME = XMODULE_METRIC_NAME + '.duration'
XMODULE_METRIC_SAMPLE_RATE = 0.1

# Stats event sent to DataDog in order to determine if old XML parsing can be deprecated.
DEPRECATION_VSCOMPAT_EVENT = 'deprecation.vscompat'

# xblock view names

# This is the view that will be rendered to display the XBlock in the LMS.
Expand Down

0 comments on commit d7b7f70

Please sign in to comment.