Stop reporting expected startup URL-lookup timeouts to Sentry (BL-16575) - #8082
Stop reporting expected startup URL-lookup timeouts to Sentry (BL-16575)#8082hatton wants to merge 1 commit into
Conversation
|
[Claude Sonnet 5] Consulted Devin on 2026-07-20 01:18 UTC up to commit No Bugs, no Investigate flags. 1 Informational note (not posted, low signal): the InnerException chain-walk in |
TryGetUrlDataFromServer is a deliberate 2.5s/3s best-effort lookup that already falls back to a cached/default URL on failure -- the user sees nothing. Timeouts/cancellations/network failures there are expected on slow connections, so reporting them to Sentry was pure noise burying real issues (BLOOM-DESKTOP-ERZ, -2H2: ~889 events/141 users). Add IsExpectedTransientLookupFailure to classify and suppress just those expected cases, walking the InnerException chain since the AWS SDK wraps the underlying WebException/timeout. Genuinely unexpected failures (e.g. a JSON parse error) are still reported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bd04eb0 to
19fd8b0
Compare
JohnThomson
left a comment
There was a problem hiding this comment.
I tested that it fixes the messages we actually want to stop. Maybe there are others we could stop too; I don't think it's worth futher complication.
@JohnThomson made 1 comment.
Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on hatton).
|
This is still in draft, but it was ready for Review, so I assume John wants us to look at it. I'm concerned that we are too readily throwing away the signal here. It's easy to say, "Well, this has no impact on the user," but imagine that the timeout was unreasonably short. Is it actually true that this has no impact on the user? Then why does this URL lookup even exist? So therefore, that's a specious argument that opus is making. I guess what I want is at least some consideration of whether the current timeout is the appropriate one. |
Summary
TryGetUrlDataFromServer(startup URL lookup,BloomS3Client.DownloadFile) is a deliberate 2.5s/3s best-effort call that already falls back to a cached/default URL on any failure — the user sees nothing.UrlLookup.IsExpectedTransientLookupFailure(Exception), which walks theInnerExceptionchain looking forTimeoutException,OperationCanceledException(coversTaskCanceledException),WebException,SocketException, orHttpRequestException. Those are now logged locally but no longer sent to Sentry. Anything else (e.g. a JSON parse error) is still reported, since that would be a real bug.Fix authored by Claude Opus 4.8; PR opened/landed by Claude Sonnet 5 running the preflight pipeline; rebased and live-verified by Claude Opus 5.
Ref: BL-16575
Test plan
build/agent-dotnet.sh build src/BloomExe/BloomExe.csproj— succeedsbuild/agent-dotnet.sh test src/BloomTests/BloomTests.csproj --filter "FullyQualifiedName~UrlLookupTests"— 8/8 passed (4 existing + 4 new)master(2026-07-28). Clean, no conflicts; interdiff empty (rebased patch byte-identical to the original commit). Build + tests re-run on the rebase: 8/8 pass.Live verification under the debugger (2026-07-28)
Each branch of the classifier was exercised against a real running Bloom with breakpoints on both
returnstatements inIsExpectedTransientLookupFailure, and the production exception shape was read off the actual Sentry events. All four cases behave as intended:AmazonServiceException→ innerWebException(timeout)DownloadFiletimeout cut to 1 msTaskCanceledExceptionServiceURLpointed at a non-resolvable hostHttpRequestException→ innerSocketExceptionDeserializeObjectJsonReaderException, no innerTwo things worth a reviewer's attention:
InnerExceptionwalk is load-bearing, not defensive. The production events are from the .NET Framework build, whereWebExceptionHandlerwraps the timeout in anAmazonServiceException; theWebExceptionis only reachable one level down. A flat top-level type check would suppress none of the ~889 events. On current net8 builds the SDK does not wrap — timeouts and DNS failures arrive bare and match at depth 0 — so the walk is what makes the fix cover both generations. Please don't simplify it away.BLOOM-DESKTOP-ERZ and -2H2 were confirmed byte-for-byte identical stacks — one root cause split across two Sentry groups. Both are covered.
Devin's single informational note from the earlier consult (a network failure hidden inside a multi-cause
AggregateExceptionwould not be found, since the walk follows only the singleInnerExceptionlink) is now closed empirically as well as by inspection: the real call path usesGetAwaiter().GetResult(), and every live repro produced a bare exception, never anAggregateException.Devin review
This change is