Skip to content

Commit

Permalink
docs: Expose telemetry backend requirements in readme (#411)
Browse files Browse the repository at this point in the history
Maybe formalize some of this in extras requirements later for better
version management.
  • Loading branch information
timmc-edx committed May 7, 2024
1 parent 81f185e commit a5ffc86
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
17 changes: 17 additions & 0 deletions edx_django_utils/monitoring/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ Feature support matrix for built-in telemetry backends:
- ❌
- ❌

Additional requirements for using these backends:

- ``edx_django_utils.monitoring.NewRelicBackend``:

- Install the ``newrelic`` Python package
- Initialize newrelic, either via the ``newrelic-admin run-program`` wrapper or ``newrelic.agent`` API calls during server startup

- ``edx_django_utils.monitoring.OpenTelemetryBackend``:

- Install the ``opentelemetry-api`` Python package
- Initialize opentelemetry, either via the ``opentelemetry-instrument`` wrapper or ``opentelemetry.instrumentation`` API calls during server startup

- ``edx_django_utils.monitoring.DatadogBackend``:

- Install the ``ddtrace`` Python package
- Initialize ddtrace, either via the ``ddtrace-run`` wrapper or ``ddtrace.auto`` API calls during server startup

Using Custom Attributes
-----------------------

Expand Down
12 changes: 1 addition & 11 deletions edx_django_utils/monitoring/internal/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class NewRelicBackend(TelemetryBackend):
"""
Send telemetry to New Relic.
https://docs.newrelic.com/docs/apm/agents/python-agent/python-agent-api/guide-using-python-agent-api/
API reference: https://docs.newrelic.com/docs/apm/agents/python-agent/python-agent-api/guide-using-python-agent-api/
"""
def __init__(self):
if newrelic is None:
Expand All @@ -82,11 +82,6 @@ class OpenTelemetryBackend(TelemetryBackend):
"""
Send telemetry via OpenTelemetry.
Requirements to use:
- Install `opentelemetry-api` Python package
- Configure and initialize OpenTelemetry
API reference: https://opentelemetry-python.readthedocs.io/en/latest/
"""
# pylint: disable=import-outside-toplevel
Expand All @@ -108,11 +103,6 @@ class DatadogBackend(TelemetryBackend):
"""
Send telemetry to Datadog via ddtrace.
Requirements to use:
- Install `ddtrace` Python package
- Initialize ddtrace, either via ddtrace-run or ddtrace.auto
API reference: https://ddtrace.readthedocs.io/en/stable/api.html
"""
# pylint: disable=import-outside-toplevel
Expand Down

0 comments on commit a5ffc86

Please sign in to comment.