Skip to content

Commit 6b789d6

Browse files
committed
skip unsampled udp exporter if otlp endpoint is configured
1 parent a39d60f commit 6b789d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/AwsApplicationSignalsCustomizerProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ private SdkTracerProviderBuilder customizeTracerProviderBuilder(
206206

207207
// If running on Lambda, we just need to export 100% spans and skip generating any Application
208208
// Signals metrics.
209-
if (isLambdaEnvironment()) {
209+
if (isLambdaEnvironment()
210+
&& System.getenv(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_CONFIG) == null) {
210211
String tracesEndpoint =
211212
Optional.ofNullable(System.getenv(AWS_XRAY_DAEMON_ADDRESS_CONFIG))
212213
.orElse(DEFAULT_UDP_ENDPOINT);

0 commit comments

Comments
 (0)