OTLP Metrics - update to delta aggregation (#12752)

Source :
https://opentelemetry.io/docs/specs/otel/metrics/data-model/#sums
This commit is contained in:
Etienne
2025-06-20 10:03:50 +02:00
committed by GitHub
parent cb6a76fd43
commit 901cc1feb8

View File

@ -3,6 +3,7 @@ import process from 'process';
import opentelemetry from '@opentelemetry/api'; import opentelemetry from '@opentelemetry/api';
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http'; import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http';
import { import {
AggregationTemporality,
ConsoleMetricExporter, ConsoleMetricExporter,
MeterProvider, MeterProvider,
PeriodicExportingMetricReader, PeriodicExportingMetricReader,
@ -65,6 +66,7 @@ const meterProvider = new MeterProvider({
new PeriodicExportingMetricReader({ new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({ exporter: new OTLPMetricExporter({
url: process.env.OTLP_COLLECTOR_METRICS_ENDPOINT_URL, url: process.env.OTLP_COLLECTOR_METRICS_ENDPOINT_URL,
temporalityPreference: AggregationTemporality.DELTA,
}), }),
exportIntervalMillis: 10000, exportIntervalMillis: 10000,
}), }),