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

How to enable Python Applications monitoring with OneAgent native support

tomkrysz
Dynatrace Enthusiast
Dynatrace Enthusiast

To ensure successful instrumentation of your Python application with OneAgent, follow these essential configuration steps:

1. Enable Python Monitoring

Navigate to:

Settings → Monitoring → Monitored technologies → Python

tomkrysz_8-1752052416689.png

 

Make sure the "Monitor Python" option is enabled.

 

2. Enable Your Python Framework

If you're using a specific framework like FastAPI, ensure it's enabled under:

Settings → Preferences → OneAgent Features

tomkrysz_9-1752052422989.png

 

Look for "Python FastAPI [Opt-In]" and enable it.

 

3. Enable Process Group Monitoring

Go to:

Settings → Processes and containers → Process group monitoring

tomkrysz_10-1752052432060.png

 

Ensure automatic deep monitoring is enabled.

 

4. [optional] Set Custom Monitoring Rules (not needed if running in container)

If your application isn't automatically detected, define a custom rule:

Settings → Processes and containers → Custom process monitoring rules

tomkrysz_11-1752052439107.png

 

This helps Dynatrace identify and monitor your Python processes correctly.

 

5. [optional] Special Note for PaaS Installations (Pre-1.315)

For PaaS setups using OneAgent versions prior to 1.315, manual configuration is required.

In the ruxitagentproc.conf file, add:

[agentType]
python on

[general]
pythonInjection on

Example Dockerfile Snippet:

# Install Dynatrace OneAgent
COPY --from=tenant.live.dynatrace.com/linux/oneagent-codemodules:python / /
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
ENV DT_AGENTTYPE_OVERRIDE python=on

# Append Python settings to ruxitagentproc.conf
RUN echo -e "[agentType]\npython on\n\n[general]\npythonInjection on" >> /opt/ruxitagentproc.conf

 

Python version

Please make sure that you are using supported python version CPython 3.8-3.13 List of supported python frameworks here: https://docs.dynatrace.com/docs/shortlink/section-technology-support#python

 

For further informations about python module please see our documentation here: https://docs.dynatrace.com/docs/shortlink/python

1 REPLY 1

Tip for anyone setting this up - for some reason Dynatrace UI does not report anything in case injection fails, like it does for all other processes. At least in my case I had to dig through the OA logs to find out that injection failed due to unsupported Python version. But there was no feedback in the UI. Normally I'd expect to see a message under the process such as "Activation of deep monitoring was unsuccessful".

Featured Posts