You can send data from your Python application to Dynatrace. Python is a versatile, high-level programming language known for its readability and simplicity, often used for web development, data analysis, artificial intelligence, and scientific computing due to its extensive libraries and community support.
Injects into Python processes and supported containers automatically. Injection rules enable the exclusion or inclusion of specific processes and containers.
Tracks CPU usage, memory consumption, and responsiveness of Python processes in real time.
Monitors Python workloads running inside containers, capturing container-specific performance metrics and metadata about the container technology and environment.
Provides runtime metrics, including garbage collection (GC) activity, thread metrics, and loaded library versions.
Provides remote configuration updates that allow monitoring settings to be adjusted remotely via OneAgent. Changes are applied at runtime (without requiring a process restart when possible).
Generates diagnostic data for troubleshooting, including support archives accessible via the OneAgent Diagnostics UI.
Comprehensive end-to-end transaction tracing for requests to web services, remote services, message queues, databases, and others. For more information, see Services.
Third-party vulnerability detection. For more information, see Runtime Vulnerability Analytics.
OpenTelemetry support for capturing traces. For more information, see Instrument your Python application with OpenTelemetry.
OneAgent SDK for custom tracing.
If you already use the OneAgent SDK for Python or OneAgent SDK Python auto-instrumentation, we recommend migrating to enable auto-instrumentation using OneAgent for Python.
See our supported technologies matrix for details on supported technologies used in conjunction with Python.
To activate Python monitoring
Through OpenPipeline, you can use and configure technology bundles. A technology bundle is a library of parsers (processing rules), that process logs from various technologies such as Java, .NET, Microsoft IIS, etc.
Parsers help you to improve filtering, troubleshooting, metrics, alerts, and dashboards by efficiently extracting log levels and relevant attributes. You can also use technology bundles to structure logs from technologies that are not supported by Dynatrace out of the box.
For more information, see Process logs with technology bundle parsers.
The OneAgent Python code module supports applications instrumented by the OneAgent SDK for Python. Both can work together in the same application.
The Dynatrace OneAgent SDK for Python is a wrapper of the Dynatrace OneAgent SDK for C/C++.
When the Python code module is installed, it replaces Dynatrace OneAgent SDK for C/C++ internally and collects data produced by OneAgent SDK for Python. This means that traces produced by the SDK will be linked with those produced by the Python code module itself.
The Python code module can capture Python stack traces in the background for the method hotspots feature.
DT_PYTHON_FORKABLE
to 0
. After setting the environment variable, restart the application.t
suffix, for example, Python3.13t
.DeprecationWarning: This process (pid=12345) is multi-threaded, use of fork() may lead to deadlocks in the child.
This is because after the fork and before Python checks if the process is multi-threaded, the code module already has to restart its threads.
If the warning only appears with the Python code module and not if it is removed,
it is a false positive and can be ignored.
Otherwise, it may indicate a problem in application code and should be taken seriously.