test(ddtrace/tracer): reproduce queue-full trace drops under a stalled agent - #5140
Conversation
…d agent Adds a deterministic synctest-based harness that saturates the writer's concurrentConnectionLimit outgoing connections with a stalled agent stub, forcing the single worker goroutine to block inside flush() and stop draining t.out. Asserts payloadQueueSize overflows and the reason:queue_full counter from #5136 fires exactly once. Part of #5135 (Part 4, item 1: reproduce the queue drop locally). Stacked on #5136.
Config Audit |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 6a80cda | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-08-05 15:06:09 Comparing candidate commit 6a80cda in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 326 metrics, 0 unstable metrics, 1 flaky benchmarks without significant changes.
|
3905db8
into
dario.castane/wonderful-shirley-bc4283
Summary
TestQueueOverflowOnStalledAgent, a deterministictesting/synctest-based harness that saturates the writer'sconcurrentConnectionLimitoutgoing connections with a stalled agent stub (blockingTransport), forcing the tracer's single worker goroutine to block insideflush()and stop drainingt.out.payloadQueueSizeoverflows and thereason:queue_fullcounter (added in fix(ddtrace/tracer): instrument payload queue-full trace drops #5136) fires exactly once.Part of #5135 (Part 4, item 1: "Reproduce the queue drop locally"). Stacked on #5136 — this PR's diff will shrink to just
queue_overflow_test.goonce that one merges.Test plan
go build ./...go vet ./...go test .(fullddtrace/tracerpackage suite)TestQueueOverflowOnStalledAgentrun 20x with-race, no flakesgofmt -lclean