question

Stephan D. avatar image
Stephan D. asked ·

Is it planned to support Python (Framworks like Django, Flask etc.) without any changes to the code?

Hi,

I alread read your blog entry https://www.dynatrace.com/news/blog/from-monitoring-to-software-intelligence-for-flask-applications but still have a few question regarding monitoring python with the Dynatrace OneAgent.

1. Why is the agent not able to inject into the Python Application by itself, like it does for .NET, Java etc.?

2. Is it planned to support automatic injection into Python and if so, can you maybe name a release date? Changes to the code are always ... meh.


I was really surprised when someone told me, that AppDynamics has a Python Agent which is able to monitor every request of a python app to the method level including db calls without any code changes. I couldn't belive this because Dynatrace and the provided features are always better than AppD in my opinion. But yeah that seems to be true and I'm wondering if you guys are planning something similar as well.


Edit: for clarification purposes - AppDynamics needs a library and a pyagend which needs to be started with the application. It is not like the Dynatrace OneAgent automatic injection for e.g. JAVA but works without changing the code.

Kind regards,
Stephan

oneagentmonitoringpython
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

David L. avatar image
David L. answered ·

AppDynamics DOES NOT automatically inject into python processes, you have to install the library and instrument the app. https://docs.appdynamics.com/display/PRO45/Install+the+Python+Agent, they even suggest you run a 'pyagent' wrapper around your application.

We are working on easier/automated instrumentation, for now there are some interesting projects like https://github.com/dlopes7/autodynatrace that significantly reduce the effort to instrument your code.



3 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hi David,

it's true that it won't work without adding a library and running the pyagent as a wrapper but at the end no code changes are needed which is great.

Looking forward to the easier / automated injection for python. Any prediction for the release or eap?

Thank for pointing me to the autodynatrace project. I'll have a look tomorrow.

0 Likes 0 · ·

Hi Stephan,

From the documentation of the others, they may not require explicit code change as such. However, the amount of configuration change required appears to be a similar burden for manual effort.

In any case, David's autodynatrace for Python looks like a good option if it's too much to add the small number of lines manually as per the blog post you linked for the Flask / WSGI-based app examples.


Andrew

0 Likes 0 · ·

I looked the "autodynatrace" project and the effort to integrate it at least for flask is pretty low. What I would need is this kind of wrapper for Django and PostgreSQL but atm I'm not so familiar with Django so I probably won't be able to write a wrapper by myself.

0 Likes 0 · ·
Alexandre M. avatar image
Alexandre M. answered ·

Hello,

+1 ! It would be great ... I discovered today dynatrace didn't support auto instrumentation of Python (like PHP/.NET).

Even Instana is able to instrument Python out of the box, I can't believe Dynatrace is not able to do it ! (https://www.instana.com/blog/zero-effort-fully-automatic-distributed-tracing-for-python/ )

Is this something planned ? Any EAP coming ? (I really hope so :))

Thanks,

Alex

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Alexandre M. avatar image
Alexandre M. answered ·

Hello Dynatrace PM,

Do you have any news about any support out of the box of Python language ? More and more microservices use python and you don't support out of the box.

Thanks

Alex

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

As far as I know - sadly not.
We went with the https://github.com/dlopes7/autodynatrace project but you need to adapt your code and probably do some tweaking to get the visibility you are looking for. But it improved by a lot.

For us, it is the only minus point using Dynatrace. All other features are top notch.

I really hope something will be announced in the near future. Other APM solutions support Python (Instana) and so should Dynatrace as the current leader of APM. Also Dynatrace plugins are based on Python only but the OneAgent can not instrument it automatically.

0 Likes 0 · ·