-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(analytics): added client columns in payments analytics #4658
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mentsConfirm request headers
2 tasks
…ments confirm request headers
….com/juspay/hyperswitch into feat/payment_analytics_sdk_columns
…om/juspay/hyperswitch into feat/payment_analytics_sdk_columns
…t/client_cols_in_payment_attempts
….com/juspay/hyperswitch into feat/payment_analytics_sdk_columns
…t/payment_analytics_sdk_columns
lsampras
reviewed
May 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the clickhouse scripts in crates/analytics/docs/clickhouse/scripts
?
lsampras
approved these changes
May 22, 2024
ivor-juspay
approved these changes
May 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of Change
Description
Added client columns in payments analytics
ClientSource
,ClientVersion
Depends on #4657
closes #4656
Additional Changes
Motivation and Context
How did you test it?
curl --location 'localhost:8080/analytics/v1/metrics/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer' \ --data '[ { "timeRange": { "startTime": "2024-01-13T18:30:00Z", "endTime": "2024-06-16T18:30:00Z" }, "metrics": [ "payment_success_rate", "payment_count", "payment_success_count", "payment_processed_amount", "avg_ticket_size" ], "groupByNames": [ "connector", "payment_method", "payment_method_type", "currency", "authentication_type", "status", "client_source", "client_version" ] } ]'
{ "queryData": [ { "payment_success_rate": null, "payment_count": 1, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": "failure", "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": null, "payment_count": 1, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": "failure", "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": null, "client_source": "test", "client_version": "test2", "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": 0.0, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": null, "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": 0.0, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": null, "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": null, "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": null, "payment_count": 1, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": "confirmation_awaited", "connector": null, "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": 0.0, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": null, "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": null, "client_source": "test", "client_version": "test2", "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": 0.0, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": null, "connector": null, "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" }, { "payment_success_rate": null, "payment_count": 4, "payment_success_count": null, "payment_processed_amount": 0, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "currency": "USD", "status": "failure", "connector": "stripe", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": null, "client_source": null, "client_version": null, "time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" }, "time_bucket": "2024-01-13 18:30:00" } ], "metaData": [ { "current_time_range": { "start_time": "2024-01-13T18:30:00.000Z", "end_time": "2024-06-16T18:30:00.000Z" } } ] }
Checklist
cargo +nightly fmt --all
cargo clippy