---
title: Usage Metrics
description: Learn how to monitor your APM usage.
breadcrumbs: Docs > APM > The Trace Pipeline > Usage Metrics
---

# Usage Metrics

## Overview{% #overview %}

The following in-app configuration pages allow you to set ingested and indexed volumes for APM:

- Use the **[Ingestion Control Page](https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_controls.md)** to control ingested span volume.
- Use the **[Retention Filters page](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention.md#retention-filters)** to control the number of indexed spans.

Both pages are powered by **usage metrics**.

The following metrics are available in your account:

- `datadog.estimated_usage.apm.ingested_bytes` (billed dimension)
- `datadog.estimated_usage.apm.ingested_spans`
- `datadog.estimated_usage.apm.ingested_traces`
- `datadog.estimated_usage.apm.indexed_spans` (billed dimension)

Leverage these metrics in dashboards and monitors to visualize and control your usage. Two out-of-the box dashboards are built with these metrics. These dashboards help monitor your APM usage as well as your ingested and indexed span volumes.

Datadog APM plans come with indexed and ingested spans included. For more information, see the [Pricing page](https://www.datadoghq.com/pricing/?product=apm#apm) or some [pricing example scenarios](https://docs.datadoghq.com/account_management/billing/apm_tracing_profiler.md).

### Ingested spans volume{% #ingested-spans-volume %}

The following metrics are associated with ingested spans usage:

- `datadog.estimated_usage.apm.ingested_bytes`
- `datadog.estimated_usage.apm.ingested_spans`
- `datadog.estimated_usage.apm.ingested_traces`

To control usage, use `datadog.estimated_usage.apm.ingested_bytes`. Ingestion is metered by volume, not by the number of spans or traces. This metric is tagged with `env`, `service`, and`sampling_service`. These tags help identify which environments and services contribute to the ingestion volume. For more information about the `sampling_service` dimension, read What is the sampling service?.

This metric is also tagged by `ingestion_reason`, reflecting which [ingestion mechanisms](https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_mechanisms.md) are responsible for sending spans to Datadog. These mechanisms are nested in the tracing libraries of the Datadog Agent. For more information about this dimension, see the [Ingestion Reasons dashboard](https://app.datadoghq.com/dash/integration/apm_ingestion_reasons).

The `datadog.estimated_usage.apm.ingested_traces` metric measures the number of requests sampled per second, and only counts traces sampled by [head-based sampling](https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_mechanisms.md#head-based-sampling). This metric is also tagged by `env` and `service` so you can spot which services are starting the most traces.

#### What is the sampling service?{% #what-is-the-sampling-service %}

The `sampling_service` dimension on the `datadog.estimated_usage.apm.ingested_bytes` assigns ingested bytes to the **service that makes the sampling decision**, not the service emitting the span.

Group the metric by `sampling_service` to identify services contributing the most to total ingested volumes. For instance, if service `A` starts a trace and makes a head-based sampling decision before calling services `B` and `C`, all bytes from services `A`, `B`, and `C` are attributed to `sampling_service:A`.

{% image
   source="https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/sampling_service.8fc76ef8945eaa151eee1559c4c6565c.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/sampling_service.8fc76ef8945eaa151eee1559c4c6565c.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Ingested Bytes sampling service explanation" /%}

### Indexed spans{% #indexed-spans %}

Use the `datadog.estimated_usage.apm.indexed_spans` metric to control the number of spans indexed by [tag-based retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention.md#retention-filters).

This metric is tagged by `env` and `service` so you can spot which environments and services are contributing to the indexing usage.

## APM Traces Estimated Usage dashboard{% #apm-traces-estimated-usage-dashboard %}

The [APM Traces Usage dashboard](https://app.datadoghq.com/dash/integration/apm_estimated_usage) contains several widget groups displaying high-level KPIs and additional usage information.

{% image
   source="https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/dashboard_apm_usage.d7b33dc5f5e730ce1a6f724fd076d36f.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/dashboard_apm_usage.d7b33dc5f5e730ce1a6f724fd076d36f.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="APM Estimated Usage Dashboard" /%}

In this dashboard, you can find information about:

- Global usage metrics
- Infrastructure with APM enabled, including hosts, Fargate, and AWS Lambda
- Ingestion volumes separated by `service`, `env`, and `ingestion_reason`
- Indexing volumes separated by `service` and `env`

## APM Ingestion Reasons dashboard{% #apm-ingestion-reasons-dashboard %}

The [APM Ingestion Reasons dashboard](https://app.datadoghq.com/dash/integration/apm_ingestion_reasons) provides insights on each source of ingestion volume. Each ingestion usage metric is tagged with an `ingestion_reason` dimension, so you can see which configuration options (Datadog Agent configuration or tracing library configuration) and products (such as RUM or Synthetic Testing) are generating the most APM data.

{% image
   source="https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/dashboard_ingestion_reasons.d4a88cdf87388ba944d4e645b8009c0e.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/tracing/trace_indexing_and_ingestion/usage_metrics/dashboard_ingestion_reasons.d4a88cdf87388ba944d4e645b8009c0e.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="APM Ingestion Reasons Dashboard" /%}

For each ingestion reason, you can find out which environments and services are contributing the most to the overall volume.

## Further Reading{% #further-reading %}

- [Trace Ingestion](https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_controls.md)
- [Trace Retention](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention.md)
