signoz/pkg/query-service
Ankit Nayan 32ad4ef571
Feat: enables metrics ingestion to signoz (#271)
* WIP promql support

* forked prometheus and promhouse integrated

* removing __debug_bin from  git

* feat: prometheus config file to load

* feat: read prometheus config from args

* fix: WIP fixing errors in docker build

* feat: added clickhousemetricswrite exporter in metrics

* feat: changing otelcol image tag

* fix: read prometheus.yml from config flag in docker-compose

* fix: WIP clickhouse connection error

* fix: used signoz/prometheus tag v1.9.4

* chore: response format as in prometheus

* chore: query_range works with clickhouse reader and throws not implemented error for druid

* chore: moved ApiError struct to model

* feat: enabled instant query api for metrics

* chore: parser for instant query api params
2021-08-29 10:28:40 +05:30
..
2021-06-01 10:00:48 +05:30
2021-01-03 18:15:44 +05:30
2021-01-03 18:15:44 +05:30
2021-01-03 18:15:44 +05:30
2021-01-03 18:15:44 +05:30
2021-01-08 00:40:19 +05:30

Query Service

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)
  • parse response from databases and handle error if any
  • build 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:

    DruidClientUrl: http://signoz-druid-router:8888
    DruidDatasource: flattened_spans

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

cd pkg/query-service
go build -o build/query-service main.go
DruidClientUrl=xxxx DruidDatasource=flattened_spans build/query-service

Docker Images

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