Metric data type

The New Relic platform is built around four telemetry data types we believe are necessary for complete and effective system monitoring: metrics, events, logs, and traces.

This document describes the metric types collected and reported by our platform.

Metric types

The metric type determines how the data is aggregated over longer time windows. It also determines which functions you can use to query the data.

Metric types Description Available query functions
count

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.

The value must be a positive double.

Generally, you want to take the rate of the sum:

From Metric select rate(sum(myMetric), 1 minute) . . .

distribution

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.
  • is generated only via the event-to-metrics service.

The distribution type uses the same algorithm as the percentile function.

  • percentile
  • histogram
  • min
  • max
  • sum
  • count
  • average
gauge

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

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.

  • min
  • max
  • sum
  • count
  • average
uniqueCount

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.

For more help

If you need more help, check out these support and learning resources: