Bogdanp/dramatiq

Issue with ddtrace, FastAPI, and dramatiq[watch]

emhagman opened this issue · 0 comments

What OS are you using?

macOS 13.6.4 (or debian also issue occurs)

What version of Dramatiq are you using?

1.16.0

What did you do?

First off, thank you so much for this library. It's fantastic and I appreciate the work.

I wasn't sure which place to post this so I posted it on both.
Please see: DataDog/dd-trace-py#8272

When installing dramatiq[watch] specifically, ddtrace no longer carries context of root trace using FastAPI. Please note you don't even need to be using watching with dramatiq for this to break. Simply importing import dramatiq with the feature flag installed breaks the tracing context in ddtrace.

This does not happen if the dramatiq[watch] feature flag is installed so it's fixable for now by separating local vs production requirements.txt but it seems like a larger issue worth looking into.

It's much easier if you just read this thread I posted on ddtrace: DataDog/dd-trace-py#8272

It appears to be related to one of these libraries:

gevent==23.9.1
greenlet==3.0.3
watchdog==3.0.0
watchdog-gevent==0.1.1
zope.event==5.0
zope.interface==6.1

What did you expect would happen?

Tracing would work.

What happened?

Tracing did not work.