Skip to content

Conversation

@garysassano
Copy link

Fixes #297

Solution

Updated hasCustomOtlpTraceEndpoint() to also check for the generic OTEL_EXPORTER_OTLP_ENDPOINT environment variable, per the OpenTelemetry OTLP Exporter specification:

function hasCustomOtlpTraceEndpoint() {
  // Check for signal-specific endpoint first, then fall back to generic endpoint
  // per OpenTelemetry OTLP Exporter specification
  return (
    process.env['OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'] !== undefined ||
    process.env['OTEL_EXPORTER_OTLP_ENDPOINT'] !== undefined
  );
}

Changes

  • aws-distro-opentelemetry-node-autoinstrumentation/src/aws-opentelemetry-configurator.ts: Updated hasCustomOtlpTraceEndpoint() to recognize both OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and OTEL_EXPORTER_OTLP_ENDPOINT as custom endpoints.
  • aws-distro-opentelemetry-node-autoinstrumentation/test/aws-opentelemetry-configurator.test.ts: Added test case to verify that setting OTEL_EXPORTER_OTLP_ENDPOINT in Lambda environment uses OTLP exporter instead of UDP.

@garysassano garysassano requested a review from a team as a code owner December 4, 2025 05:24
@wangzlei
Copy link
Contributor

wangzlei commented Dec 8, 2025

@garysassano Thanks for the contribution! This issue might happen in other language SDKs as well, we will audit if it should be applied to other SDK repos.

@wangzlei wangzlei added the skip changelog doesn't need a CHANGELOG entry label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog doesn't need a CHANGELOG entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADOT Lambda Layer ignores OTEL_EXPORTER_OTLP_ENDPOINT in favor of OTEL_EXPORTER_OTLP_TRACES_ENDPOINT

2 participants