Skip to content

The open alternative to Salesforce, designed for AI.

OTLP Metrics - update to delta aggregation (#12752)

Etienne901cc1feb82c
diff --git a/packages/twenty-server/src/instrument.ts b/packages/twenty-server/src/instrument.ts
index 87eb8c83a67..fc68041b88d 100644
--- a/packages/twenty-server/src/instrument.ts
+++ b/packages/twenty-server/src/instrument.ts
@@ -3,6 +3,7 @@ import process from 'process';
import opentelemetry from '@opentelemetry/api';
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http';
import {
+ AggregationTemporality,
ConsoleMetricExporter,
MeterProvider,
PeriodicExportingMetricReader,
@@ -65,6 +66,7 @@ const meterProvider = new MeterProvider({
new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({
url: process.env.OTLP_COLLECTOR_METRICS_ENDPOINT_URL,
+ temporalityPreference: AggregationTemporality.DELTA,
}),
exportIntervalMillis: 10000,
}),