juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
11.07k stars 1.19k forks source link

[FEATURE] Populate status code and delivery attempt information in outgoing webhooks ClickHouse events #5070

Open SanchithHegde opened 2 weeks ago

SanchithHegde commented 2 weeks ago

Description

As of opening this issue, the outgoing webhooks ClickHouse events contain a few fields:

https://github.com/juspay/hyperswitch/blob/ca61e47585071865cf7df5c05fdbe3f57818ca95/crates/router/src/events/outgoing_webhook_logs.rs#L11-L21

There are error and is_error fields that indicate whether an error occurred when delivering the webhook to the merchant server, but do not include any information on whether the merchant server even received the webhook.

To address this issue, we must include the following optional fields in the ClickHouse events:

The fields would have to be added in the OutgoingWebhookEvent struct, and the corresponding columns must be added in the ClickHouse table. Once the fields have been added in code, the fields must be populated from the Event in the database:

thegeek13242 commented 2 weeks ago

Hi @lsampras @SanchithHegde , I am willing to work on this issue please assign it to me

lsampras commented 2 weeks ago

Hey @thegeek13242 thanks for your interest, have assigned you the issue.

You can find the docs about setting up clickhouse locally for testing here. Can ask any doubts/questions about this on the issue or our discord/slack channels.

Good luck.... 🍀