signoz/pkg/query-service
Prashant Shahi 6fb7e34dbc
chore: 🔧 otel-collector config changes (#1388)
* chore: 🔧 otel-collector config changes

* chore: 🗑️  remove redundant users.xml

* chore: 🔧 otel-config changes

- seperate scraper job for otel-collector and otel-collector-metrcs internal metrics
- use resourcedetection only for hostmetrics
- add swarm service name and task name in resource attributes env

Signed-off-by: Prashant Shahi <prashant@signoz.io>
2022-07-14 19:36:19 +05:30
..
2022-07-14 11:59:06 +05:30
2021-01-03 18:15:44 +05:30
2022-07-14 10:24:03 +05:30
2022-07-14 11:59:06 +05:30
2022-07-14 11:59:06 +05:30
2021-09-02 13:18:47 +05:30
2022-07-14 11:59:06 +05:30
2022-07-06 11:45:42 +05:30

Query Service

Query service is the interface between frontend 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 Clickhouse queries (and all other supported database queries)
  • parse response from databases and handle error if any
  • clickhouse response in the format accepted by Frontend

Configuration

  • 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:

    ClickHouseUrl=tcp://localhost:9001
    STORAGE=clickhouse

Build and Run locally

cd pkg/query-service
go build -o build/query-service main.go
ClickHouseUrl=tcp://localhost:9001 STORAGE=clickhouse build/query-service

Docker Images

The docker images of query-service is available at https://hub.docker.com/r/signoz/query-service