Skip to content

fix(integration-tests): retry .NET trace lookup with extra indexing wait#1300

Draft
lym953 wants to merge 1 commit into
mainfrom
yiming.luo/fix-dotnet-trace-flake
Draft

fix(integration-tests): retry .NET trace lookup with extra indexing wait#1300
lym953 wants to merge 1 commit into
mainfrom
yiming.luo/fix-dotnet-trace-flake

Conversation

@lym953

@lym953 lym953 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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" (requestWithRetry only retries on Datadog API 429s). .NET on 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 .NET disproportionately loses the race against the fixed wait window.

This PR gives .NET one 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 --noEmit passes with no errors.
  • Retriggering dd-gitlab/integration-suite: [lmi|on-demand|snapstart] on this branch to confirm the .NET trace assertions no longer flake.

.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.
@datadog-prod-us1-5

This comment has been minimized.

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.

1 participant