diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 412afd5eab..7b63015435 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,8 +48,15 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](ht - git clone https://github.com/SigNoz/signoz.git - run `sudo make dev-setup` to configure local setup to run query-service -- comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L59` -- comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L38` +- comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L45` +- comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L28` +- add below configuration to clickhouse section at `docker/clickhouse-setup/docker-compose.yaml` +``` + expose: + - 9000 + ports: + - 9001:9000 +``` - Install signoz locally without the frontend and query-service - If you are using x86_64 processors (All Intel/AMD processors) run `sudo make run-x86` - If you are on arm64 processors (Apple M1 Macbooks) run `sudo make run-arm` diff --git a/pkg/query-service/README.md b/pkg/query-service/README.md index c4c96a9757..72b69afc9a 100644 --- a/pkg/query-service/README.md +++ b/pkg/query-service/README.md @@ -2,27 +2,30 @@ Query service is the interface between forntend and databases. It is written in **Golang**. It will have modules for all supported databases. Query service is responsible to: - parse the request from Frontend -- create relevant Druid queries (and all other supported database queries) +- create relevant Clickhouse queries (and all other supported database queries) - parse response from databases and handle error if any -- build response in the format accepted by Frontend +- clickhouse response in the format accepted by Frontend -#### Druid Queries -Internally we use both native and sql queries to Druid. - #### Configuration -Query Service needs below `env` variables to run: +- Open ./constants/constants.go + - Replace ```const RELATIONAL_DATASOURCE_PATH = "/var/lib/signoz/signoz.db"``` \ + with ```const RELATIONAL_DATASOURCE_PATH = "./signoz.db".``` + +- Query Service needs below `env` variables to run: + ``` - DruidClientUrl: http://signoz-druid-router:8888 - DruidDatasource: flattened_spans + ClickHouseUrl=tcp://localhost:9001 + STORAGE=clickhouse ``` -The above values are the default ones used by SigNoz and are kept at `deploy/kubernetes/platform/signoz-charts/query-service/values.yaml` + + #### Build and Run locally ```console cd pkg/query-service go build -o build/query-service main.go -DruidClientUrl=xxxx DruidDatasource=flattened_spans build/query-service +ClickHouseUrl=tcp://localhost:9001 STORAGE=clickhouse build/query-service ``` #### Docker Images