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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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

1 participant