beholder: log partial delivery per-event errors with error_code and reason#2210
Draft
pkcll wants to merge 1 commit into
Draft
beholder: log partial delivery per-event errors with error_code and reason#2210pkcll wants to merge 1 commit into
pkcll wants to merge 1 commit into
Conversation
…eason
Type-assert the send callback error to *batch.PublishError so partial
delivery failures (individual events rejected by the server while the
batch RPC itself succeeded) are logged with structured error_code and
reason fields instead of a generic error string.
Also adds a failure_type attribute ("partial_delivery" vs "rpc_error")
to the eventsDropped metric to let dashboards distinguish the two drop
modes.
3 tasks
📊 API Diff Results
|
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
*batch.PublishErrorso partial delivery failures (individual events rejected server-side while the batch RPC itself succeeded) are logged with structurederror_codeandreasonfields instead of a generic error string.failure_typeattribute (partial_deliveryvsrpc_error) to thechip_ingress.events_droppedmetric to let dashboards distinguish the two failure modes.Jira: INFOPLAT-13901 | Epic: INFOPLAT-7177
Must merge before the chainlink PR that bumps this dep.
Changes
pkg/beholder/batch_emitter_service.go: type-assert*batch.PublishError; structured logging;dropMetricAttrsForhelper withfailure_typeattribute.pkg/beholder/batch_emitter_service_test.go:TestChipIngressBatchEmitterService_PartialDeliveryError— covers log fields (error_code,reason,domain,entity) and metric attribute (failure_type=partial_delivery).Test plan
go test ./pkg/beholder/... -count=1passes (all existing + new tests)error_codeandreasonfieldschip_ingress.events_dropped{failure_type="partial_delivery"}increments for per-event errorschip_ingress.events_dropped{failure_type="rpc_error"}increments for whole-batch failures