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
3 tasks
Contributor
📊 API Diff Results
|
bf62ff1 to
bcb946f
Compare
…code label - Type-assert send callback error to *batch.PublishError; log at WARN with error_code, reason, domain, entity for per-event server rejections. - Add error_code label to chip_ingress.events_dropped metric so dashboards and alerts can distinguish rejection types without relying on logs. - Whole-batch RPC failures keep the existing ERROR log; their drop metric omits error_code (no structured server code available). - Also adds failure_type label (partial_delivery / rpc_error) to the dropped counter to distinguish the two failure modes. Jira: INFOPLAT-13901
bcb946f to
59011ac
Compare
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