Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the pulse attribute decorations on unsampled lambda spans #92

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,13 @@ export class AwsOpentelemetryConfigurator {

// Register BatchUnsampledSpanProcessor to export unsampled traces in Lambda
// when Application Signals enabled
if (isLambdaEnvironment()) {
if (isLambdaEnvironment() && !hasCustomOtlpTraceEndpoint()) {
const udpSpanExporter = new OTLPUdpSpanExporter(getXrayDaemonEndpoint(), FORMAT_OTEL_UNSAMPLED_TRACES_BINARY_PREFIX);
const configuredExporter = AwsMetricAttributesSpanExporterBuilder.create(udpSpanExporter, resource).build();
spanProcessors.push(
new AwsBatchUnsampledSpanProcessor(
new OTLPUdpSpanExporter(getXrayDaemonEndpoint(), FORMAT_OTEL_UNSAMPLED_TRACES_BINARY_PREFIX),
{
maxExportBatchSize: getSpanExportBatchSize(),
}
)
new AwsBatchUnsampledSpanProcessor(configuredExporter, {
maxExportBatchSize: getSpanExportBatchSize(),
})
);
diag.info('Enabled batch unsampled span processor for Lambda environment.');
}
Expand Down
Loading