feat(eventdrop): add centralized telemetry API for dropped events #8818
+370
−0
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.
WIP: Phase 1 – Centralized telemetry API for dropped events (#8572)
Description
This PR establishes the foundation for dropped event telemetry in the Broker data plane by introducing a centralized
RecordEventDroppedAPI. The package provides OpenTelemetry instrumentation (metrics and traces) for drop sites without modifying existing handler code.This is Phase 1 - API definition only. Handler integration happens in a follow-up PR once the design is validated.
Changes
pkg/eventdroppackage with:Reasonenum capturing drop causes (TTLMissing,TTLExhausted)Infostruct for drop context metadataRecordEventDropped()entry point for unified telemetryTelemetry Strategy
Following Evan's guidance in #8572:
Metrics: Low-cardinality labels only
eventing_broker_events_dropped_totalcounternamespace,broker,trigger,reasonTraces: Full context via sampling
event-droppedevent on active spansDesign Notes
Integration (Phase 1.5)
Follow-up PR will wire this into:
pkg/broker/filter/filter_handler.go(ReasonTTLMissing)pkg/broker/ingress/ingress_handler.go(ReasonTTLExhausted)Separate PR allows design review before touching handlers.
Testing
Phase 1 validates API surface and graceful degradation. Deep OTel verification deferred until Phase 1.5 integration.
cc/ @evankanderson (per #8572 guidance) @Cali0707 @matzew @creydr - Design feedback before proceeding to handler wiring would be valuable.