feat(analytics): add source, service_call and execution_mode to connector events#12714
feat(analytics): add source, service_call and execution_mode to connector events#12714gopikrishna000 wants to merge 1 commit into
Conversation
Changed Files
|
XyneSpaces
left a comment
There was a problem hiding this comment.
Automated Review Summary
PR: feat(analytics): add source, service_call and execution_mode to connector events
Reviewer: PR Reviewer Agent
Verification Passed
✅ Schema consistency — New columns added to all connector_events tables (queue, main, audit, payout_audit) and all materialized views
✅ Enum naming — EventSource and ServiceCall use full words, no abbreviations
✅ Default values — Proper #[default] attributes on enum variants match the PR's behavior matrix
✅ Shadow leg visibility — Removing the ExecutionMode::Primary guard and adding the execution_mode field captures shadow executions as documented
✅ Error context preservation — No error chains dropped; all connector errors flow through unchanged
Findings
🔍 1. Consider adding a CHANGELOG entry
The behavioral change (shadow leg now emits events) is significant for analytics consumers. Document this in the CHANGELOG or migration notes.
Verdict: ✅ Approve — Clean, well-documented analytics enhancement. No blocking issues.
…ctor events Tags every connector event with three low-cardinality dimensions so downstream analytics can attribute each call consistently: - source: hyperswitch - service_call: external (direct connector HTTP) or internal (UCS gRPC) - execution_mode: primary or shadow Direct connector calls are tagged hyperswitch/external/primary. UCS gRPC calls are tagged hyperswitch/internal with the execution mode of the leg. The UCS gRPC event is now emitted for the shadow leg as well (previously only the primary leg), so shadow executions are captured as hyperswitch/internal/shadow. Adds the matching columns to the connector_events ClickHouse queue, tables and materialized views.
267bacc to
4cf1b9c
Compare
Closes #12717
What
Tags every connector event with three low-cardinality dimensions so downstream analytics can attribute each call:
sourcehyperswitchservice_callexternal(direct connector HTTP) /internal(UCS gRPC)execution_modeprimary/shadowHow
EventSourceandServiceCallenums incommon_enums(reusing the existingExecutionMode), plus three fields onConnectorEvent.hyperswitch / external / primary.hyperswitch / internalwith the execution mode of the leg.hyperswitch / internal / shadow.LowCardinality(String)columns to theconnector_eventsClickHouse queue, tables and materialized views.Behaviour matrix
hyperswitch / external / primaryhyperswitch / internal / primaryhyperswitch / external / primaryhyperswitch / internal / shadowTesting
cargo check -p router -p hyperswitch_interfaces -p common_enumspasses.Companion
UCS side: juspay/hyperswitch-prism#1501