---
title: Python Runtime Metrics (OpenTelemetry)
description: Collect runtime metrics from your Python applications via OpenTelemetry.
breadcrumbs: Docs > Integrations > Python Runtime Metrics (OpenTelemetry)
---

# Python Runtime Metrics (OpenTelemetry)

## Overview{% #overview %}

The Python OpenTelemetry integration allows you to collect runtime metrics from your Python applications instrumented with OpenTelemetry.

## Setup{% #setup %}

See the dedicated documentation for [Python Runtime Metrics via OpenTelemetry](https://opentelemetry.io/docs/specs/semconv/runtime/cpython-metrics/).

### Recommended Collector Processors{% #recommended-collector-processors %}

The following metrics are emitted as cumulative counters by the OpenTelemetry Python SDK. To convert them to per-second rates in Datadog, apply the [Delta To Rate processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/deltatorateprocessor) in your OpenTelemetry Collector pipeline:

- `process.cpu.time`
- `process.context_switches`
- `process.runtime.cpython.gc_count`

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **process.cpu.time**(gauge)                  | Number of seconds of CPU time used by the process*Shown as second*                       |
| **process.cpu.utilization**(gauge)           | CPU utilization of the process as a fraction of available CPU per core*Shown as percent* |
| **process.context\_switches**(gauge)         | Number of context switches for the process*Shown as invocation*                          |
| **process.runtime.cpython.gc\_count**(gauge) | Number of objects in garbage collection generations*Shown as resource*                   |
| **process.thread.count**(gauge)              | Number of threads in the process*Shown as thread*                                        |
| **process.memory.usage**(gauge)              | Amount of physical memory in use by the process*Shown as byte*                           |

## Support{% #support %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
