---
title: Custom Metrics
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Metrics > Custom Metrics
---

# Custom Metrics

{% callout %}
##### Join an enablement webinar session

Explore and register for Foundation Enablement sessions for custom metrics. Learn how custom metrics help you track your application KPIs, such as the number of visitors, average customer basket size, request latency, or performance distribution for a custom algorithm.

[SIGN UP](https://www.datadoghq.com/technical-enablement/sessions/?tags.topics-0=Metrics)
{% /callout %}

## Overview{% #overview %}

Custom metrics help you track your application KPIs: number of visitors, average customer basket size, request latency, or performance distribution for a custom algorithm. A custom metric is identified by **a unique combination of a metric's name and tag values (including the host tag)**. In the example below, the metric `request.Latency` has four unique tag value combinations from its two tag keys:

- `endpoint`, which has the value `endpoint:X` or `endpoint:Y`.
- `status`, which has the value `status:200` or `status:400`.

{% image
   source="https://datadog-docs.imgix.net/images/account_management/billing/custom_metrics/request_latency.0865373a0589c45484d2dae579a515d9.png?auto=format"
   alt="Request latency" /%}

The following are also considered custom metrics:

- In general, any metric submitted through [DogStatsD](https://docs.datadoghq.com/metrics/custom_metrics/dogstatsd_metrics_submission/) or through a [custom Agent Check](https://docs.datadoghq.com/metrics/custom_metrics/agent_metrics_submission/)
- Metrics submitted by [Marketplace integrations](https://docs.datadoghq.com/integrations/#cat-marketplace)
- Certain standard integrations can potentially emit custom metrics
- Metrics submitted from an integration that is not one of the [more than 1,000 Datadog integrations](https://docs.datadoghq.com/integrations/).

**Note**: Users with the Datadog Admin role or `usage_read` permission can see the monthly average number of custom metrics per hour and the top 5000 custom metrics for their account in the [usage details page](https://app.datadoghq.com/account/usage/hourly). Learn more about [how custom metrics are counted](https://docs.datadoghq.com/account_management/billing/custom_metrics/#counting-custom-metrics).

## Custom metrics properties{% #custom-metrics-properties %}

A Datadog custom metric has the properties below. Read the [metrics introduction](https://docs.datadoghq.com/metrics) to learn how to graph metrics within Datadog.

| Property         | Description                                                                                                                                                                                                                                                                                                                                           |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<METRIC_NAME>`  | The name of your metric.                                                                                                                                                                                                                                                                                                                              |
| `<METRIC_VALUE>` | The value of your metric. **Note**: Metric values must be 32-bit. Values should not reflect dates or timestamps.                                                                                                                                                                                                                                      |
| `<TIMESTAMP>`    | The timestamp associated with the metric value. **Note**: Metric timestamps cannot be more than ten minutes in the future or more than one hour in the past.                                                                                                                                                                                          |
| `<TAGS>`         | The set of tags associated with your metric.                                                                                                                                                                                                                                                                                                          |
| `<METRIC_TYPE>`  | The type of your metric. Read about [metric types](https://docs.datadoghq.com/metrics/types/).                                                                                                                                                                                                                                                        |
| `<INTERVAL>`     | If the `<TYPE>` of the metric is [RATE](https://docs.datadoghq.com/metrics/types/?tab=rate#metric-types) or [COUNT](https://docs.datadoghq.com/metrics/types/?tab=count#metric-types), it defines the corresponding [interval](https://docs.datadoghq.com/extend/dogstatsd/data_aggregation/#how-is-aggregation-performed-with-the-dogstatsd-server). |

### Naming custom metrics{% #naming-custom-metrics %}

The following custom metric naming convention must be followed:

- Metric names must start with a letter.
- Metric names must only contain ASCII alphanumerics, underscores, and periods.
  - Other characters, including spaces, are converted to underscores.
  - Unicode is *not* supported.
- Metric names must not exceed 200 characters. Fewer than 100 is preferred from a UI perspective.

**Note**: Metric names are case sensitive in Datadog.

### Metric units{% #metric-units %}

Set metric units through [Metrics Summary](https://docs.datadoghq.com/metrics/summary/#metric-unit) or set custom metric units with the [Unit override](https://docs.datadoghq.com/dashboards/guide/unit-override/) feature in the graph editor of your visualizations. For more information, see the [Metrics Units](https://docs.datadoghq.com/metrics/units/) documentation.

## Submitting custom metrics{% #submitting-custom-metrics %}

- [Custom Agent check](https://docs.datadoghq.com/metrics/custom_metrics/agent_metrics_submission)
- [DogStatsD](https://docs.datadoghq.com/metrics/custom_metrics/dogstatsd_metrics_submission)
- [PowerShell](https://docs.datadoghq.com/metrics/custom_metrics/powershell_metrics_submission)
- [AWS Lambda](https://docs.datadoghq.com/serverless/custom_metrics)
- [Datadog's HTTP API](https://docs.datadoghq.com/api/v1/metrics/#submit-metrics)
- [Generate Log-based metrics](https://docs.datadoghq.com/logs/log_configuration/logs_to_metrics/#generate-a-log-based-metric)
- [Generate APM span-based metrics](https://docs.datadoghq.com/tracing/generate_metrics/)
- [Generate RUM event-based metrics](https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/)
- [Generate live process-based metrics](https://docs.datadoghq.com/infrastructure/process/increase_process_retention/#generate-a-process-based-metric)

You can also use one of the [Datadog official and community contributed API and DogStatsD client libraries](https://docs.datadoghq.com/extend/community/libraries/) to submit your custom metrics

**Note**: There are no enforced fixed rate limits on custom metric submission. If your default allotment is exceeded, you are billed according to [Datadog's billing policy for custom metrics](https://docs.datadoghq.com/account_management/billing/custom_metrics/#counting-custom-metrics).

## Standard integrations{% #standard-integrations %}

The following standard integrations can potentially emit custom metrics.

| Type of integrations                           | Integrations                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Limited to 350 custom metrics by default.      | [ActiveMQ XML](https://docs.datadoghq.com/integrations/activemq/#activemq-xml-integration) / [Go-Expvar](https://docs.datadoghq.com/integrations/go_expvar/) / [Java-JMX](https://docs.datadoghq.com/integrations/java/)                                                                                                                                                                                                             |
| No default limit on custom metrics collection. | [Nagios](https://docs.datadoghq.com/integrations/nagios) /[PDH Check](https://docs.datadoghq.com/integrations/pdh_check/) /[OpenMetrics](https://docs.datadoghq.com/integrations/openmetrics/) /[Windows performance counters](https://docs.datadoghq.com/integrations/windows_performance_counters/) /[WMI](https://docs.datadoghq.com/integrations/wmi_check/) /[Prometheus](https://docs.datadoghq.com/integrations/openmetrics/) |
| Can be configured to collect custom metrics.   | [MySQL](https://docs.datadoghq.com/integrations/mysql/) /[Oracle](https://docs.datadoghq.com/integrations/oracle/) /[Postgres](https://docs.datadoghq.com/integrations/postgres/) /[SQL Server](https://docs.datadoghq.com/integrations/sqlserver/)                                                                                                                                                                                  |
| Custom metrics sent from cloud integrations    | [AWS](https://docs.datadoghq.com/integrations/amazon_web_services/)                                                                                                                                                                                                                                                                                                                                                                  |

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

- [Learn more about DogStatsD](https://docs.datadoghq.com/extend/dogstatsd/)
- [Official and Community created API and DogStatsD client libraries](https://docs.datadoghq.com/extend/community/libraries/)
- [Custom Metrics Billing](https://docs.datadoghq.com/account_management/billing/custom_metrics/?tab=countrate)
- [Best Practice for Custom Metric Governance](https://docs.datadoghq.com/metrics/guide/custom_metrics_governance/)
- [Dynamically control your custom metrics volume with Metrics without Limits™](https://www.datadoghq.com/blog/metrics-without-limits/)
- [Design effective executive dashboards with Datadog](https://www.datadoghq.com/blog/datadog-executive-dashboards)
