From 637aeea54d8fbe2e9103afdc32c2187318efece4 Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Tue, 14 Oct 2025 14:36:46 +0200 Subject: [PATCH] fix(otlp-exporter-base): avoid adding User-Agent option for browser http options --- .../src/configuration/otlp-http-configuration.ts | 2 -- .../src/configuration/otlp-node-http-configuration.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/experimental/packages/otlp-exporter-base/src/configuration/otlp-http-configuration.ts b/experimental/packages/otlp-exporter-base/src/configuration/otlp-http-configuration.ts index 5480378f771..499e33eb50f 100644 --- a/experimental/packages/otlp-exporter-base/src/configuration/otlp-http-configuration.ts +++ b/experimental/packages/otlp-exporter-base/src/configuration/otlp-http-configuration.ts @@ -24,7 +24,6 @@ import { validateAndNormalizeHeaders } from '../util'; export interface OtlpHttpConfiguration extends OtlpSharedConfiguration { url: string; headers: () => Record; - userAgent?: string; } function mergeHeaders( @@ -93,7 +92,6 @@ export function mergeOtlpHttpConfigurationWithDefaults( validateUserProvidedUrl(userProvidedConfiguration.url) ?? fallbackConfiguration.url ?? defaultConfiguration.url, - userAgent: userProvidedConfiguration.userAgent, }; } diff --git a/experimental/packages/otlp-exporter-base/src/configuration/otlp-node-http-configuration.ts b/experimental/packages/otlp-exporter-base/src/configuration/otlp-node-http-configuration.ts index 75b367bc588..92db96313bd 100644 --- a/experimental/packages/otlp-exporter-base/src/configuration/otlp-node-http-configuration.ts +++ b/experimental/packages/otlp-exporter-base/src/configuration/otlp-node-http-configuration.ts @@ -77,6 +77,7 @@ export function mergeOtlpNodeHttpConfigurationWithDefaults( userProvidedConfiguration.agentFactory ?? fallbackConfiguration.agentFactory ?? defaultConfiguration.agentFactory, + userAgent: userProvidedConfiguration.userAgent, }; }