OTLP Metrics - update to delta aggregation (#12752)
Source : https://opentelemetry.io/docs/specs/otel/metrics/data-model/#sums
This commit is contained in:
@ -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,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user