From c57c5f58a76bff604257527b674ebc19612e0ac7 Mon Sep 17 00:00:00 2001 From: renyi9044-png Date: Thu, 16 Apr 2026 13:30:06 +0800 Subject: [PATCH] fix: remove hardcoded OTEL_LOG_LEVEL DEBUG and filter parent OTEL vars Fixes #3357 --- packages/python/src/index.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/python/src/index.ts b/packages/python/src/index.ts index 6924802fd88..a62bfdcfef6 100644 --- a/packages/python/src/index.ts +++ b/packages/python/src/index.ts @@ -89,7 +89,12 @@ export const python = { nodeOptions: { ...(options.nodeOptions || {}), env: { - ...process.env, + // Filter out parent OTEL vars to prevent stderr flood + ...Object.fromEntries( + Object.entries(process.env).filter( + ([key]) => !key.startswith("OTEL_") + ) + ), ...options.env, TRACEPARENT: carrier["traceparent"], OTEL_RESOURCE_ATTRIBUTES: `${ @@ -97,7 +102,6 @@ export const python = { }=trigger,${Object.entries(taskContext.attributes) .map(([key, value]) => `${key}=${value}`) .join(",")}`, - OTEL_LOG_LEVEL: "DEBUG", }, }, throwOnError: false, @@ -151,7 +155,12 @@ export const python = { nodeOptions: { ...(options.nodeOptions || {}), env: { - ...process.env, + // Filter out parent OTEL vars to prevent stderr flood + ...Object.fromEntries( + Object.entries(process.env).filter( + ([key]) => !key.startswith("OTEL_") + ) + ), ...options.env, TRACEPARENT: carrier["traceparent"], OTEL_RESOURCE_ATTRIBUTES: `${