---
title: Metric data structure
source: https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type
---

The New Relic platform reports four main [telemetry data types](https://docs.newrelic.com/docs/telemetry-data-platform/ingest-manage-data/understand-data/new-relic-data-types): metrics, events, logs, and traces.

This doc will help you understand some details about the structure of our `Metric` data type. This data type is also referred to as "dimensional metrics." For a high level explanation of this data type, see [Metric data type](https://docs.newrelic.com/docs/data-apis/understand-data/new-relic-data-types/#metrics). And for how to query this type of data, see [Query metrics](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/query-metric-data-type).

Better understanding the details of the `Metric` structure will help you understand what you see in New Relic, and help you create custom queries and charts of your data. The more you use advanced New Relic features, like reporting custom metrics and creating custom charts, the more this knowledge will come in handy.

## Metric types

The metric `type` determines how the data is aggregated over longer time windows and determines what [fields](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions/#func-getfield) and functions are available to analyze and query.

| Metric types      | Supported APIs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Available query functions                                                                                                                                  |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `count`           | ✅ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ❌ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) ✅ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ✅ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics)              | Measures the number of occurrences of an event. The count should be reset to `0` every time the metric is reported. Examples include cache hits per reporting interval and the number of threads created per reporting interval. You must specify a value for `interval.ms` when reporting the `count` metric type using the [Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api). The value must be a positive double. Generally, you want to take the `rate` of the `sum`: ````sql FROM Metric SELECT rate(sum(myMetric), 1 minute) . . . ```  ```` | - [`sum`](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions#func-sum)                 |
| `cumulativeCount` | ❌ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ❌ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) ✅ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ✅ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics)              | Equivalent to the `count` type described above, but in addition this gives access to cumulative metric fields. For more on this, see [Cumulative metrics](https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/cumulative-metrics). This type is slightly larger than a typical count, and therefore can add to data ingest.                                                                                                                                                                                                                                                                | - [sum](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions#func-sum)                   |
| `distribution`    | ❌ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ✅ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) (delta only) ✅ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ✅ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics) | Tracks the statistical distribution on a numeric attribute. This metric is re-aggregatable. For example, 1-minute data points from 60 minutes can be aggregated into a 1-hour data point, without degradation on accuracy. This type: - Supports statistical functions like percentile and histogram, and all functions supported by the summary type. - Uses the same algorithm as the percentile function.                                                                                                                                                                                                | - `percentile` - `histogram` - `min` - `max` - `sum` - `count` - `average`                                                                                 |
| `gauge`           | ✅ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ❌ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) ✅ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ✅ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics)              | Represents a value that can increase or decrease with time. Examples of gauges include the temperature, CPU usage, and memory. For example, there is always a temperature, but you are periodically taking the temperature and reporting it. The value must fit into the range of a Java double.                                                                                                                                                                                                                                                                                                            | - `latest` - `min` - `max` - `sum` - `count` - `average`                                                                                                   |
| `summary`         | ✅ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ✅ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) ✅ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ✅ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics) (legacy)     | Used to report pre-aggregated data, or information on aggregated discrete events. A summary includes a `count`, `sum` value, `min` value, and `max` value. The `count` value must be positive. Examples include transaction count/durations and queue count/ durations. You must specify a value for `interval.ms` when reporting the `summary` metric type using the [Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api).                                                                                                                           | - `min` - `max` - `sum` - `count` - `average`                                                                                                              |
| `uniqueCount`     | ❌ [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/report-metrics-metric-api) ✅ [New Relic Events to Metrics](https://docs.newrelic.com/docs/data-apis/convert-to-metrics/analyze-monitor-data-trends-metrics) ❌ [Prometheus Remote Write](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic) ❌ [OpenTelemetry](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-metrics) (legacy)     | Tracks the number of unique values on a string or numeric attribute. This metric is re-aggregatable. For example, 1-minute data points from 60 minutes can be aggregated into a 1-hour data point, without degradation on accuracy. This type is generated only via the [event-to-metrics service](https://docs.newrelic.com/docs/accounts/accounts/data-management/introduction-events-metrics-service).                                                                                                                                                                                                   | - [`uniqueCount`](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions#func-uniqueCount) |
