edx-django-utils
edx-django-utils copied to clipboard
Add Datadog support for span-related monitoring functions
trafficstars
[Consider breaking out each method as its own ticket when this is to be picked up.]
Acceptance criteria:
- [ ] Complete all of the following for each method:
- [x]
function_trace: https://github.com/openedx/edx-django-utils/pull/435- [x] Move implementation into
NewRelicBackend. - [x] Implement in
DatadogBackend. - [x] Update function to call all of the telemetry backends.
- [x]
edx_django_utils/monitoring/README.rstupdated with latest compatibility info. - [x] Inform owners of calling code, especially for backward-incompatible changes in Datadog.
- [x] Move implementation into
- [ ]
set_monitoring_transaction_name- [ ] Move implementation into
NewRelicBackend. - [ ] Implement in
DatadogBackend. - [ ] Update function to call all of the telemetry backends.
- [ ]
edx_django_utils/monitoring/README.rstupdated with latest compatibility info. - [ ] Inform owners of calling code, especially for backward-incompatible changes in Datadog (see notes).
- [ ] Move implementation into
- [ ]
ignore_transaction- [ ] Move implementation into
NewRelicBackend. - [ ] Implement in
DatadogBackend. - [ ] Update function to call all of the telemetry backends.
- [ ]
edx_django_utils/monitoring/README.rstupdated with latest compatibility info. - [ ] Inform owners of calling code, especially for backward-incompatible changes in Datadog.
- [ ] Move implementation into
- [ ] Handle
get_current_transactionappropriately (see notes). - [ ] Handle
background_taskappropriately (see notes).
- [x]
Implementation notes:
- Optionally, choose new names that are less specific to NR, and deprecate the old names (leaving stubs in their place that emit a warning and call the new function).
Other notes:
- Some repos currently call these directly on
newrelic.agentrather than using edx-django-utils's indirection. https://github.com/edx/edx-arch-experiments/issues/621 covers resolving this. - It appears that
get_current_transactionis currently only used internally, despite being exposed, so it can probably be skipped for now. - Relatedly,
background_taskappears to be completely unused. (Should this be retired?) - 2U did not end up using OpenTelemetry, so we can't commit to adding support to OpenTelemetryBackend at the moment. These new methods can be implemented as no-ops in that backend.
- The method
set_monitoring_transaction_nameis used for XBlocks here, and the resource name will probably change, which may affect monitoring or other XBlock related observability.