This page describes how the Code Monitoring DPS capability is consumed and billed. For an overview of the capability, including its main features, see Code Monitoring.
The unit of measure for Dynatrace Code Monitoring consumption is the container-hour.
Each concurrent process consumes container-hours. This consumption can be calculated for containerized and non-containerized workloads:
Billing granularity is based on 15-minute intervals. One 15-minute interval is equivalent to 0.25 container-hours.
The figure below illustrates how container-hour consumption is calculated over the course of an entire hour (i.e., four 15-minute intervals).

This section describes the different Dynatrace tools that you can use to track consumption and costs.
In
Notebooks, use the following DQL query to get an overview of Code Monitoring consumption.
It returns the total number of container-hours consumed per day, for all days that Code Monitoring is running.
fetch dt.system.events, scanLimitGBytes: -1| filter event.kind == "BILLING_USAGE_EVENT"| filter event.type == "Code Monitoring"| dedup event.id| summarize ContainerHours=sum(billed_container_hours), by:{timestamp=bin(timestamp, 1d)}| sort timestamp ASC
You can track your usage in Account Management. Go to Account Management > Subscription > Overview > Cost and Usage Details > Capability: Code Monitoring > Actions > View details.
You can query metrics via the Environment API - Metrics API v2.