OpenTelemetry metrics are largely compatible with New Relic dimensional metrics. We support OpenTelemetry metrics v0.10. All of the supported metric types include an independent set of associated attributes (name-value pairs) which map directly to dimensions you can use to facet or filter metric data at query time. OpenTelemetry metrics are accompanied by a set of resource attributes that identify the originating entity that produced them and map to dimensions for faceting and filtering.
The OpenTelemetry data model for metrics defines a number of different metric types: sum, gauge, histogram, and summary.
OpenTelemetry sums are a scalar metric that is the sum of all data points over a given time window. Sums have a notion of temporality indicating whether reported values incorporate previous measurements (cumulative temporality) or not (delta temporality).
In addition, sums can either be monotonic (only go up or only go down) or non-monotonic (go up and down).
In New Relic, delta metrics are handled differently depending on whether they are monotonic or non-monotonic:
- Monotonic delta sums are mapped to the count metric type.
- Non-monotonic delta sums are not supported. Things measured in this fashion do not generate meaningful data as they are most likely summed to be used. See this community pull request and our documentation on Gauges versus counters for more discussion.
Monotonic and non-monotonic cumulative sums are mapped to the New Relic gauge metric type.
OpenTelemetry gauge metric data points represent a sampled value at a given time. These values are converted to the New Relic gauge metric type. OpenTelemetry gauges do not have an aggregation temporality, but the sampled values can be aggregated at query time.
OpenTelemetry histograms compactly represent a population of recorded values along with a total count and sum. Optionally, histograms may include a series of buckets with explicit bounds and a count value for that bucket's population.
New Relic doesn't currently support cumulative histograms. Instead, convert your cumulative histograms to delta temporality.
Before configuring your SDK to use delta temporality, see the specification for the OTLP metric exporter.
You can use this account query to determine if metrics are being dropped due to unsupported temporality:
FROM NrIntegrationError SELECT * WHERE message = 'One or more OTLP metric data point(s) were dropped due to unsupported AggregationTemporality.'
Counts from OpenTelemetry histogram buckets are assigned to New Relic’s distribution metric buckets using linear interpolation. Also, OpenTelemetry has negative and positive infinity bound buckets which we represent in New Relic as zero-width buckets. We do this because we do not have a representation for negative and positive infinity. For example, an OpenTelemetry bucket with bounds
\[-∞, 10) will be represented by a
\[10,10) zero width New Relic bucket. You may see exaggerated bucket counts at the endpoints of your distribution due to this translation.
OpenTelemetry summary metric data points are used to represent quantile summaries (for example, P99 latency). These map directly to the New Relic summary metric type, however the only quantiles we maintain are the 0.0 and 1.0 quantiles for min and max. If percentiles are something you wish to capture, prefer Histogram metrics.
Summary metric data points include count, sum, and quantile values, with 0.0 as min and 1.0 as max. OpenTelemetry provides summary metrics for compatibility with other formats.
startTimeUnixNano field is optional according to the OpenTelemetry specification. When this field is provided, it is used for the timestamp on the resulting New Relic metric, and the
duration is calculated as
timeUnixNano - startTimeUnixNano. The
duration field is used to calculate the queryable
endTimeStamp attribute on the New Relic metric, but it serves no other semantic purpose.
startTimeUnixNano is not provided, then
timeUnixNano is used for the timestamp field on the resulting New Relic metric, and the duration field is set to zero.
OpenTelemetry metrics and other signals may include attributes that consist of a homogenous array of primitive types. New Relic supports non-nested homogeneous arrays with less than 65 elements.
OpenTelemetry defines exemplar values that allow other signals, like traces, to be connected to a metric event and provide context. Exemplars are not supported by New Relic.
Consider these tips for building metric NRQL queries in New Relic.
Since cumulative sums are converted to gauges, here are some ways to query your data:
When New Relic converts cumulative sums to gauges, you can query them using either the
derivative() NRQL functions. The function you choose depends on whether you want to see the raw value or compute the rate of change.
New Relic histograms translated from OpenTelemetry metrics have the same query semantics as other New Relic histograms. Namely, the
histogram() NRQL function can be used to represent the histogram with a configurable number of buckets and bucket width. Note that you may see larger bucket counts at the endpoint buckets. This is because we are adding negative and positive infinity bound OpenTelemetry buckets into a zero width New Relic bucket.
TIMESERIES keyword is not supported for New Relic histograms.