From c9b194183c8a1531a5ca5b3cc0d8ed9c5de4d5f1 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Thu, 19 Feb 2026 11:44:42 -0800 Subject: [PATCH] Revert delta. --- src/agent/aksLoader.ts | 5 +---- src/agent/types.ts | 1 - test/unitTests/agent/aksLoader.tests.ts | 15 --------------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/agent/aksLoader.ts b/src/agent/aksLoader.ts index 78407d17..6ee47807 100644 --- a/src/agent/aksLoader.ts +++ b/src/agent/aksLoader.ts @@ -11,7 +11,7 @@ import { InstrumentationOptions } from '../types'; import { OTLPMetricExporter as OTLPProtoMetricExporter } from "@opentelemetry/exporter-metrics-otlp-proto"; import { OTLPMetricExporter as OTLPHttpMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http"; import { MetricReader, PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics"; -import { ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE, OTLP_METRIC_EXPORTER_EXPORT_INTERVAL } from './types'; +import { OTLP_METRIC_EXPORTER_EXPORT_INTERVAL } from './types'; export class AKSLoader extends AgentLoader { @@ -55,9 +55,6 @@ export class AKSLoader extends AgentLoader { ) ); - // Ensure Delta temporality is used for OTLP metrics - process.env[ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE] = "Delta"; - // Create metricReaders array and add OTLP reader if environment variables request it try { const metricReaders: MetricReader[] = []; diff --git a/src/agent/types.ts b/src/agent/types.ts index e3842027..0b6fbe4c 100644 --- a/src/agent/types.ts +++ b/src/agent/types.ts @@ -5,7 +5,6 @@ export const AZURE_APP_NAME = process.env.WEBSITE_SITE_NAME || 'unknown'; export const AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH"; export const OTLP_METRIC_EXPORTER_EXPORT_INTERVAL = 60000; // in ms -export const ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"; export interface IAgentLogger { log(message: any, ...optional: any[]): void; diff --git a/test/unitTests/agent/aksLoader.tests.ts b/test/unitTests/agent/aksLoader.tests.ts index d57f9636..4c03daa5 100644 --- a/test/unitTests/agent/aksLoader.tests.ts +++ b/test/unitTests/agent/aksLoader.tests.ts @@ -355,21 +355,6 @@ describe("agent/AKSLoader", () => { assert.equal(exporter.constructor.name, "OTLPMetricExporter", "Should be an OTLPMetricExporter"); }); - it("constructor sets OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE to Delta", () => { - const env = { - ["APPLICATIONINSIGHTS_CONNECTION_STRING"]: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333", - }; - process.env = env; - - new AKSLoader(); - - assert.equal( - process.env["OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"], - "Delta", - "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE should be set to Delta" - ); - }); - it("constructor creates OTLP metric reader when OTEL_METRICS_EXPORTER contains mixed case otlp with other exporters", () => { const env = { ["APPLICATIONINSIGHTS_CONNECTION_STRING"]: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333",