-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(analytics): Add documentation for setting up data services and e…
…nabling data features in control center (#4741)
- Loading branch information
Showing
7 changed files
with
190 additions
and
96 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[default.theme] | ||
primary_color="#006DF9" | ||
primary_hover_color="#005ED6" | ||
sidebar_color="#242F48" | ||
|
||
[default.endpoints] | ||
api_url="http://localhost:8080" # The backend hyperswitch API server for making payments | ||
sdk_url="http://localhost:9050/HyperLoader.js" # SDK distribution url used for loading the SDK in control center | ||
logo_url="" | ||
favicon_url="" | ||
mixpanel_token="" | ||
|
||
[default.features] | ||
test_live_toggle=false | ||
is_live_mode=false | ||
email=false | ||
quick_start=false | ||
audit_trail=true | ||
system_metrics=false | ||
sample_data=false | ||
frm=false | ||
payout=true | ||
recon=false | ||
test_processors=true | ||
feedback=false | ||
mixpanel=false | ||
generate_report=false | ||
user_journey_analytics=false | ||
authentication_analytics=false | ||
surcharge=false | ||
dispute_evidence_upload=false | ||
paypal_automatic_flow=false | ||
threeds_authenticator=false | ||
global_search=false | ||
dispute_analytics=true | ||
configure_pmts=false | ||
branding=false | ||
totp=false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Running Kafka & Clickhouse with Analytics and Events Source Configuration | ||
|
||
This document provides instructions on how to run Kafka and Clickhouse using Docker Compose, and how to configure the analytics and events source. | ||
|
||
## Architecture | ||
+------------------------+ | ||
| Hyperswitch | | ||
+------------------------+ | ||
| | ||
| | ||
v | ||
+------------------------+ | ||
| Kafka | | ||
| (Event Stream Broker) | | ||
+------------------------+ | ||
| | ||
| | ||
v | ||
+------------------------+ | ||
| ClickHouse | | ||
| +------------------+ | | ||
| | Kafka Engine | | | ||
| | Table | | | ||
| +------------------+ | | ||
| | | | ||
| v | | ||
| +------------------+ | | ||
| | Materialized | | | ||
| | View (MV) | | | ||
| +------------------+ | | ||
| | | | ||
| v | | ||
| +------------------+ | | ||
| | Storage Table | | | ||
| +------------------+ | | ||
+------------------------+ | ||
|
||
|
||
## Starting the Containers | ||
|
||
Docker Compose can be used to start all the components. | ||
|
||
Run the following command: | ||
|
||
```bash | ||
docker compose --profile olap up -d | ||
``` | ||
This will spawn up the following services | ||
1. kafka | ||
2. clickhouse | ||
3. opensearch | ||
|
||
## Setting up Kafka | ||
|
||
Kafka-UI is a visual tool for inspecting Kafka and it can be accessed at `localhost:8090` to view topics, partitions, consumers & generated events. | ||
|
||
## Setting up Clickhouse | ||
|
||
Once Clickhouse is up and running, you can interact with it via web. | ||
|
||
You can either visit the URL (`http://localhost:8123/play`) where the Clickhouse server is running to get a playground, or you can bash into the Clickhouse container and execute commands manually. | ||
|
||
Run the following commands: | ||
|
||
```bash | ||
# On your local terminal | ||
docker compose exec clickhouse-server bash | ||
|
||
# Inside the clickhouse-server container shell | ||
clickhouse-client --user default | ||
|
||
# Inside the clickhouse-client shell | ||
SHOW TABLES; | ||
``` | ||
|
||
## Configuring Analytics and Events Source | ||
|
||
To use Clickhouse and Kafka, you need to enable the `analytics.source` and update the `events.source` in the configuration file. | ||
|
||
You can do this in either the `config/development.toml` or `config/docker_compose.toml` file. | ||
|
||
Here's an example of how to do this: | ||
|
||
```toml | ||
[analytics] | ||
source = "clickhouse" | ||
|
||
[events] | ||
source = "kafka" | ||
``` | ||
|
||
After making this change, save the file and restart your application for the changes to take effect. | ||
|
||
## Enabling Data Features in Dashboard | ||
|
||
To check the data features in the dashboard, you need to enable them in the `config/dashboard.toml` configuration file. | ||
|
||
Here's an example of how to do this: | ||
|
||
```toml | ||
[default.features] | ||
audit_trail=true | ||
system_metrics=true | ||
``` |
This file was deleted.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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