Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Expose telemetry backend requirements in readme #411

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading