How are Metrics Calculated?
In Trace0, Python metrics come from the following two OpenTelemetry sources:- Requests metrics are calculated from the service’s
SPAN_KIND_SERVERspans, one per request the service handles. Request count, requests per second, latency percentiles and errors are all derived from these spans and their durations and statuses. - Python runtime metrics (Threads and Garbage Collection) are calculated from the OpenTelemetry metrics the Python runtime reports, as defined by the OpenTelemetry semantic conventions for CPython metrics.
Service Instances
Python runtime metrics are reported separately by each instance of your service, so we show them for one instance at a time. Requests metrics are calculated from spans and cover all instances. We identify an instance using one of the following OpenTelemetry resource attributes, in order of preference:
Select an instance from the instance filter to view its Python runtime metrics. If your service doesn’t report any of these attributes, Python runtime metrics are not shown.


Python runtime metrics aren’t shown for serverless runtimes (e.g.
AWS Lambda), as each execution environment is short-lived and its runtime metrics aren’t meaningful on their own. Serverless-specific metrics (e.g. cold starts) are coming soon.Aggregation Temporality
OpenTelemetry Sum metrics (Counters and UpDownCounters) and Histogram metrics are reported with an aggregation temporality, which decides what each reported data point means. We use the most recent aggregation temporality the service reported for the metric in the selected period. An aggregation temporality can either beCumulative or Delta.
Gauge and Summary metrics don’t have an aggregation temporality, so this doesn’t apply to them.
Metrics
We currently display the following application metrics for services running on Python:Requests
Single Value
Chart