fix(integration-tests): retry .NET trace lookup with extra indexing wait#1300
Draft
lym953 wants to merge 1 commit into
Draft
fix(integration-tests): retry .NET trace lookup with extra indexing wait#1300lym953 wants to merge 1 commit into
lym953 wants to merge 1 commit into
Conversation
.NET traces intermittently miss the fixed 5-minute Datadog indexing window used by invokeAndCollectTelemetry, causing flaky failures in the lmi/on-demand/snapstart integration-suite jobs (single-shot trace query, no poll/backoff). The .NET tracer bootstraps via a CLR profiler exec wrapper, which is slower and more variable than Node/Python/Java. Give .NET one extra 3-minute wait and retry before giving up, without slowing down the other runtimes sharing the same invocation batch.
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
dd-gitlab/integration-suite: [lmi|on-demand|snapstart]jobs have been intermittently failing on.NET-runtime trace assertions (e.g.should send one trace to Datadog→ received 0 traces), while Node/Python/Java pass reliably in the same runs. Seen 3 times in a row on #1299, confirmed unrelated to that PR's diff.Root cause:
invokeAndCollectTelemetry(integration-tests/tests/utils/default.ts) does a single fixed sleep (DEFAULT_DATADOG_INDEXING_WAIT_MS, 5 minutes) after invoking all functions, then does a single point-in-time trace query per request ID — there's no poll/backoff for "trace not indexed yet" (requestWithRetryonly retries on Datadog API 429s)..NETon Lambda bootstraps via a CLR profiler exec wrapper (AWS_LAMBDA_EXEC_WRAPPER=/opt/datadog_wrapper+ JIT), which is slower and more variable than Node/Python/Java's instrumentation init, so.NETdisproportionately loses the race against the fixed wait window.This PR gives
.NETone extra 3-minute wait + retry specifically when its trace hasn't shown up yet, without slowing down the other runtimes that share the same invocation batch/wait.Testing
npx tsc --noEmitpasses with no errors.dd-gitlab/integration-suite: [lmi|on-demand|snapstart]on this branch to confirm the .NET trace assertions no longer flake.