Skip to content

Commit 83c56b5

Browse files
authored
Revert delta. (#1489)
1 parent 5e8ee08 commit 83c56b5

3 files changed

Lines changed: 1 addition & 20 deletions

File tree

src/agent/aksLoader.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { InstrumentationOptions } from '../types';
1111
import { OTLPMetricExporter as OTLPProtoMetricExporter } from "@opentelemetry/exporter-metrics-otlp-proto";
1212
import { OTLPMetricExporter as OTLPHttpMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
1313
import { MetricReader, PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
14-
import { ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE, OTLP_METRIC_EXPORTER_EXPORT_INTERVAL } from './types';
14+
import { OTLP_METRIC_EXPORTER_EXPORT_INTERVAL } from './types';
1515

1616
export class AKSLoader extends AgentLoader {
1717

@@ -55,9 +55,6 @@ export class AKSLoader extends AgentLoader {
5555
)
5656
);
5757

58-
// Ensure Delta temporality is used for OTLP metrics
59-
process.env[ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE] = "Delta";
60-
6158
// Create metricReaders array and add OTLP reader if environment variables request it
6259
try {
6360
const metricReaders: MetricReader[] = [];

src/agent/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const AZURE_APP_NAME = process.env.WEBSITE_SITE_NAME || 'unknown';
55
export const AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH";
66

77
export const OTLP_METRIC_EXPORTER_EXPORT_INTERVAL = 60000; // in ms
8-
export const ENV_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE";
98

109
export interface IAgentLogger {
1110
log(message: any, ...optional: any[]): void;

test/unitTests/agent/aksLoader.tests.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -355,21 +355,6 @@ describe("agent/AKSLoader", () => {
355355
assert.equal(exporter.constructor.name, "OTLPMetricExporter", "Should be an OTLPMetricExporter");
356356
});
357357

358-
it("constructor sets OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE to Delta", () => {
359-
const env = {
360-
["APPLICATIONINSIGHTS_CONNECTION_STRING"]: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333",
361-
};
362-
process.env = env;
363-
364-
new AKSLoader();
365-
366-
assert.equal(
367-
process.env["OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"],
368-
"Delta",
369-
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE should be set to Delta"
370-
);
371-
});
372-
373358
it("constructor creates OTLP metric reader when OTEL_METRICS_EXPORTER contains mixed case otlp with other exporters", () => {
374359
const env = {
375360
["APPLICATIONINSIGHTS_CONNECTION_STRING"]: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333",

0 commit comments

Comments
 (0)