Skip to content

[FEATURE] Tag connector events with source, service_call and execution_mode dimensions #12717

@gopikrishna000

Description

@gopikrishna000

Feature Description

Connector events emitted to ClickHouse (connector_events) currently can't be attributed to who made the call, what kind of call it was, or whether it was the real or a shadow execution. As Hyperswitch routes traffic through the Unified Connector Service (UCS) — including shadow mode where a direct call and a UCS call run side by side — we need to distinguish these legs in analytics.

Proposal

Add three low-cardinality dimensions to every connector event:

column values meaning
source hyperswitch / ucs which service emitted the event
call_type connector / service the call to the payment connector vs a request at the UCS service interface
execution_mode primary / shadow real execution vs shadow mirror

call_type is a leg label — orthogonal to source and caller/transport-agnostic, so it stays correct regardless of caller or transport. execution_mode is the two-state observability projection of the routing ExecutionMode (NotApplicable = Direct = a live leg → primary).

Expected tagging

scenario events (source / call_type / execution_mode)
Direct hyperswitch / connector / primary
UCS primary hyperswitch / service / primary · ucs / service / primary · ucs / connector / primary
Shadow — direct leg hyperswitch / connector / primary
Shadow — UCS leg hyperswitch / service / shadow · ucs / service / shadow · ucs / connector / shadow

The UCS side emits matching field names (with call_type derived from its EventStage) so both producers land in the same connector_events table.

Scope

  • Add the fields to ConnectorEvent and populate them at the direct connector path and the UCS gRPC path (including the shadow leg).
  • Add the matching LowCardinality(String) columns to the connector_events ClickHouse tables and materialized views.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions