Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python SDK consumer instrumentation


My architecture to test the instrumentation for consumers using python and django application

- kubernetes AWS (Linux amz)

- Django(4.1.9) application with gunicorn(20)

- Python 3.11

-Consumers using django management command using django-stomp (stomp protocol) and one test using pika


We had the use of dynatrace through a partner company and we instrumented the applications through autodynatrace.

At the beginning of the year, we migrated the use of dynatrace to internal control to obtain all the monitoring power it brings.


In these changes, I noted a problem with consumer instrumentation using autodynatrace (it had no metrics or data) and a while ago I implemented traces and logs using opentelemetry + ingestion in dynatrace, with opentelemetry we got the correct end-to-end traces (from publication to the consumer) but we lost the database analysis interfaces (query, quantity, slowness) which is very important for tshoot and improvements.


After speaking with dynatrace support(ticket case 133516), we were informed that via opentelemetry we did not have this database view for using dynatrace. Since then we are trying to include monitoring/instrumentalization of the messenger layer using autodynatrace.


We were able to create and validate the expected behavior for the publication part when it comes from a view, but when trying to instrument the consumer, which is a code executed from a django command, we can see the events in the logs but they do not appear in dynatrace.

From what we've seen so far, everything indicates that the Kubernetes resources for these consumers, dynatrace cannot infer a “service” and therefore the traces are not correct(example into test simple project).

We had documentation of any way to instrument django commands or any help to understand what configuration is missing.

On the simple project I'm included the instructions to reproduce the error and show more details.

Related issue -


DynaMight Legend
DynaMight Legend

@matheus do you still need assistance on this issue?



The dlopes and Andreas Grabner helped me with the github issue in the example project and we can solve this problem. 

Featured Posts