Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SanchithHegde opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
A-Analytics A-webhooks Area: Webhook flows C-feature Category: Feature request or enhancement good first issue Good for newcomers

Comments

@SanchithHegde
Copy link
Member

Description

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

pub struct OutgoingWebhookEvent {
merchant_id: String,
event_id: String,
event_type: OutgoingWebhookEventType,
#[serde(flatten)]
content: Option<OutgoingWebhookEventContent>,
is_error: bool,
error: Option<Value>,
created_at_timestamp: i128,
initial_attempt_id: Option<String>,
}

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:

  • status_code
  • delivery_attempt
  • initial_attempt_id

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:

  • The delivery_attempt and initial_attempt_id are available directly in the Event struct.
  • The status_code field is available within the response struct, if the webhook was delivered to the merchant server.
@SanchithHegde SanchithHegde added C-feature Category: Feature request or enhancement A-webhooks Area: Webhook flows A-Analytics labels Jun 21, 2024
@lsampras lsampras added the good first issue Good for newcomers label Jun 21, 2024
@thegeek13242
Copy link

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

@lsampras
Copy link
Member

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.... 🍀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analytics A-webhooks Area: Webhook flows C-feature Category: Feature request or enhancement good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants