dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

Python profiling not working with gunicorn

Open FlavioAlexander opened this issue 2 years ago • 2 comments

Hello all,

I have enabled python profiling by following the steps listed here: docs

Which version of dd-trace-py are you using?

ddtrace==1.1.1

Which version of pip are you using?

pip 21.3.1

Which version of the libraries are you using?

Python 3.9.12 Django==3.2.13

How can we reproduce your problem?

Just enable Python profiling by setting up DD_PROFILING_ENABLED=true

What is the result that you get?

I can't see nothing under the profiling tab

What is the result that you expected?

Start getting data for python under the profile tab

Important to mention, I do get traces for other parts of the stack (Django, Celery, redis, etc). I am trying to enable profiling to hunt down a memory leak issue.

FlavioAlexander avatar Jun 22 '22 15:06 FlavioAlexander

Hi @FlavioAlexander

Which worker class are you using?

jd avatar Sep 20 '22 14:09 jd

Have the same issue. Gunicorn with uvicorn worker.

piotrekm7 avatar Sep 21 '22 08:09 piotrekm7

@jd @piotrekm7 @FlavioAlexander do you still experience this issue on ddtrace==1.9.3? It included a significant improvement in gunicorn support. If upgrading to that version doesn't fix the problem, I'm sorry to say that at the moment ddtrace does not support gunicorn's uvicorn worker type, so you may indeed see unexpected behavior when using them together.

emmettbutler avatar Mar 20 '23 14:03 emmettbutler

I'm closing this due to inactivity. Please comment if it's still relevant to you, and I'll reopen it.

emmettbutler avatar Nov 10 '23 19:11 emmettbutler