feat(router): observe subscription delivery outcomes - #2
Draft
mwisner wants to merge 1 commit into
Draft
Conversation
Router image scan passed✅ No security vulnerabilities found in image: |
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.
Summary
Why
router.engine.messages.sentcombines successful data updates, resolver error paths, and heartbeats. It cannot show whether an update was data or an error, and several resolver-error paths increment it without knowing whether the error frame reached the WebSocket. A failed normal data flush is also not represented by that counter.The new
router.engine.websocket.framescounter records the actual protocol write result. This distinguishes, for example:frame_type:data,result:successerrors_onlyframe withresult:successresult:failureresult:failureA successful WebSocket write is server-side delivery, not proof that the client application processed the frame.
Branch relationship
This is a stacked PR based on
mwisner/fix/kafka-consumer-client-leak, the head branch for wundergraph#3133. The branch therefore retains the merged-context Kafka poller and deferred consumer-client cleanup. This PR must not be merged into the leak-fix branch; after wundergraph#3133 merges, it should be retargeted/rebased onto upstreammain.No StockX custom-module code or custom-module observability interface is involved.
Metrics
router.streams.processed.messageswg.stream.processing.result:dispatchedordroppedwg.stream.processing.reason: hook error, timeout, panic, removal, ornonerouter.engine.subscription.resolution.errorswg.subscription.reasonrouter.engine.websocket.framesValidation
go test -race ./...go vet ./...staticcheck ./...b3f25fd276ea5c3cfdad36010e2956f49e4fd43d