Skip to content

Conversation

@jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Jan 31, 2025

Issue #, if available:
Currently, if AppSignals is disabled, UDP Span Exporter not usable in Lambda.

According to this comment, the correct logic should be:

If isLambdaEnvironment is true, we will default to exporting OTel spans via udp_exporter, regardless of whether AppSignals is true or false.

Currently, this is not respected because when AppSignals is disabled, ADOT's otel config cannot use the UDPExporter

  • Currently, the only difference between the AppSignals enabled and AppSignals disabled configurations is that in the "disabled" case, ADOT leaves the Span Exporter/Processor and textMapPropagator initialization work to the OTel JS SDK. Only in AppSignals enabled scenario, the configured UDPExporter is accessible.

Description of changes:
Update configure() to not depend on AppSignalsEnabled flag (always use the Span Exporter/Processor and textMapPropagator configurations made from the ADOT configurator)

  • Similarly to Python, always use the ADOT configured Span Exporter/Processor, which is already configured based on the AppSignalsEnabled flag
  • textMapPropagator configuration is still using upstream's configuration (includes the XRay Propagator)

Testing:

  • Add Unit Test
  • Test that spans are exported in Lambda when AppSignals is disabled

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee requested a review from a team as a code owner January 31, 2025 20:22
@jj22ee jj22ee merged commit 470c0d1 into main Feb 1, 2025
9 checks passed
@jj22ee jj22ee deleted the udp-exporter-non-appsignals branch February 1, 2025 01:33
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.

2 participants