Ask questionscan you globally disable tracer via an environment variable?

it'd be helpful for our local/test development environments if we could disable ddtrace globally via an environment variable.

i tried using DD_TRACE_ANALYTICS_ENABLED but that doesn't seem to do the trick

$ python -c "import ddtrace; print(ddtrace.tracer.enabled)"
$ DD_TRACE_ANALYTICS_ENABLED=false python -c "import ddtrace; print(ddtrace.tracer.enabled)"

also can't find any env var in the docs or from poking around the code here:

if it helps, our main requirement is that the traces aren't actually sent over network once done. it's still fine if the traces are instrumented locally!


Answer questions zhammer

great. yeah in these cases we're not running via ddtrace-run.

can help out with a PR if needed


Related questions

Memory Leak? hot 1
[Django + uwsgi] DATADOG_TRACE settings never loaded hot 1
Large traces hit Request Entity Too Large errors hot 1
Github User Rank List