# Observe and protect your Python stacks

**URL:** <https://community.dynatrace.com/t/observe-and-protect-your-python-stacks/50947>\
**Category:** Product News\
**Tags:** dynatrace-managed, python, oneagent\
**Created:** [March 28, 2025, 9:33am UTC](https://community.dynatrace.com/t/observe-and-protect-your-python-stacks/50947 "2025-03-28T09:33:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Alexander](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/_alexander/32/23720_2.png) [@\_Alexander](https://community.dynatrace.com/u/_Alexander)\
**Post date:** [March 28, 2025, 9:33am UTC](https://community.dynatrace.com/t/observe-and-protect-your-python-stacks/50947/1 "2025-03-28T09:33:10Z")

</div>

Python is a popular programming language among developers and business owners due to its simplicity and extensive ecosystem that covers a wide range of frameworks and libraries, especially in the AI/ML space. However, keeping track of all Python dependencies and checking used libraries for potential vulnerabilities requires a comprehensive observability solution.

Starting with&nbsp; **OneAgent version 1.309** and **Managed version 1.310** , you can monitor your Python processes, trace your Python apps and services end-to-end, and analyze your Python apps for vulnerabilities.

### Infrastructure Observability&nbsp;

Observe the health and availability of your Python processes and identify Python garbage collection bottlenecks across all generations and thread misbehavior.

 ![Screenshot 2025-03-28 at 09.53.01.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/a/2a950189ef9223340c31c0ce83ae3372e8d398b1.png)

The following Python process metrics are available:

- Python GC collections count (gen0, gen1, gen2)
- Python GC collected objects (gen0, gen1, gen2)
- Python GC uncollectable objects (gen0, gen1, gen2)
- Python GC time (gen0, gen1, gen2)
- Number of active Python threads
- Number of allocated memory (heap) blocks

**To get started**

1. Go to&nbsp; **Settings** &nbsp;\>&nbsp; **Monitoring** &nbsp;\>&nbsp; **Monitoring technologies**.
2. Find Python and enable&nbsp; **Monitor Python**.
3. [Create a process monitoring rule](https://docs.dynatrace.com/managed/observe/infrastructure-monitoring/process-groups/configuration/pg-monitoring#rules) to enable deep monitoring of the selected processes.

### Application Observability

Automatically detect your Python applications across every tier and diagnose anomalies with Davis AI to determine the root cause down to the broken code. End-to-end service observability combined with code-level insights and exception analysis will help you ensure the robustness of your production environment.

For a complete list of all supported Python technologies, see&nbsp;[Technology support](https://docs.dynatrace.com/managed/ingest-from/technology-support#python) and [Python code module](https://docs.dynatrace.com/managed/shortlink/python).

Trace your Python apps end-to-end across every tier without blind spots:

 ![Screenshot 2025-03-27 at 16.32.55.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d5f9ee1e76fb11c49b7af0c59a3ceb35e04fa872.png)

Analyze the performance of services and endpoints in detail:

 ![Screenshot 2025-03-27 at 16.45.26.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7556abd990c1c52326fa06afd98b8b48640297c5.png)

Diagnose anomalies with Davis AI down to the broken code:

 ![Screenshot 2025-03-27 at 16.37.59.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/8/08499c718b6c7fe39b47172af0a5cc61428eae34.png)

**To get started**

1. Ensure that Python monitoring is enabled (see&nbsp;Infrastructure Observability section&nbsp;above).
2. Go to&nbsp; **Settings** &nbsp;\>&nbsp; **Preferences** &nbsp;\>&nbsp; **OneAgent features** , find and enable all Python sensors of interest, and then restart your processes.

### Vulnerability Analytics

Automatically detect Python runtime and third-party vulnerabilities in your Python applications, quickly assess their impact on your monitored environment, and prioritize remediation efforts.

 ![Screenshot 2025-03-28 at 10.04.38.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/7/f7879c093067e7cfbbf350e794c7e06399be6dbf.png)

Quickly assess the impact of a vulnerability on your apps:

 ![Screenshot 2025-03-28 at 10.05.21.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/9f95139b4246994af07422fd1eaf00290acabdc7.png)

**To get started**

1. Ensure that Python monitoring is enabled (see Infrastructure Observability section above).
2. Go to&nbsp; **Settings** &nbsp;\>&nbsp; **Preferences** &nbsp;\>&nbsp; **OneAgent features** , find and enable Python software component reporting, and then restart your processes.
3. Go to&nbsp; **Settings** &nbsp;\>&nbsp; **Application Security** &nbsp;\>&nbsp; **Vulnerability Analytics** &nbsp;\>&nbsp; **General settings** , and then enable Python.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [March 28, 2025, 11:11am UTC](https://community.dynatrace.com/t/observe-and-protect-your-python-stacks/50947/2 "2025-03-28T11:11:23Z")

</div>

Nice improvement!&nbsp;:money\_mouth\_face::dynaspin:
