edx / edx-arch-experiments

A plugin to include applications under development by the architecture team at edx
GNU Affero General Public License v3.0
0 stars 3 forks source link

feat: Add datadog_diagnostics plugin app #722

Closed timmc-edx closed 4 months ago

timmc-edx commented 4 months ago

See https://github.com/edx/edx-arch-experiments/issues/692

Testing setup: https://2u-internal.atlassian.net/wiki/spaces/ENG/pages/1173618788/Running+Datadog+in+devstack

And then in lms-shell:

make requirements
pip install ddtrace
pip install -e /edx/src/archexp/
./wrap-datadog.sh ./server.sh

Expect to see this log message: Attached MissingSpanProccessor for Datadog diagnostics

:warning: This prints "Spans created = 0; spans finished = 0" in devstack when shut down with ctrl-c, but not when restarted due to autoreload (where it prints correct info). Something is initializing Django twice and one span processor is getting span info while the other is printing at shutdown. There's more to debug here, but it seems stable enough to least try deploying it.

Merge checklist: Check off if complete or not applicable: