mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-22 04:47:46 +08:00

* chore: add payload types for autocomplete requests * chore: update the query params file location and payload * chore: add query range v3 API request/response payload types * feat: metric attribute autocomplete for the aggregation type * feat: add attrs filters autocomplete endpoints * feat(logs): add tag attribute autocomplete for logs * chore: added support for multiple datatype in value suggestion api for attributes * feat: int64/float64 added for AttributeKeyDataType along with validation * feat: filterAttributeValueResponse type updated * fix: number type updated and query updated * feat: remove tagType in keys autocomplete * feat: return isColumn value correctly for attibute keys * Update pkg/query-service/app/clickhouseReader/reader.go Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> * fix: don't skip empty strings in value autocomplete * fix: allow empty string search * feat: add top level column names of logs in key sugestion * fix: tagType column removed * feat: get attribute values from logs table for top level fields * feat: don't throw error if dataType and tagType is not present * feat: timerange select corrected * feat: autocomplete for int/float added * fix: reverted attributeValueResponse change * fix: null values handled for int and float * feat: add support for get log aggreagte attributes * feat: aggreate attribute logic updated and body added in keys autocomplete * fix: constants updaetd * fix: body type updated and empty response for noop and count * fix: isColumn logic updated --------- Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> Co-authored-by: Vishal Sharma <makeavish786@gmail.com> Co-authored-by: palashgdev <palashgdev@gmail.com>
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
Complete the clickhouse setup locally.
- Comment out the query-service and the frontend section in
signoz/deploy/docker/clickhouse-setup/docker-compose.yaml
- Change the alertmanager section in
signoz/deploy/docker/clickhouse-setup/docker-compose.yaml
as follows:
alertmanager:
image: signoz/alertmanager:0.23.0-0.1
volumes:
- ./data/alertmanager:/data
expose:
- "9093"
ports:
- "8080:9093"
# depends_on:
# query-service:
# condition: service_healthy
restart: on-failure
command:
- --queryService.url=http://172.17.0.1:8085
- --storage.path=/data
- Run the following:
cd signoz/
If you are using x86_64 processors (All Intel/AMD processors) run sudo make run-x86
If you are on arm64 processors (Apple M1 Macs) run sudo make run-arm
Backend Configuration
-
Open ./constants/constants.go
- Replace
const RELATIONAL_DATASOURCE_PATH = "/var/lib/signoz/signoz.db"
withconst RELATIONAL_DATASOURCE_PATH = "./signoz.db".
- Replace
-
Query Service needs below
env
variables to run:
export ClickHouseUrl=tcp://localhost:9001
export STORAGE=clickhouse
export ALERTMANAGER_API_PREFIX=http://localhost:9093/api/
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
Frontend Configuration for local query-service.
- Set the following environment variables
export FRONTEND_API_ENDPOINT=http://localhost:8080
- Run the following
cd signoz\frontend\
yarn install
yarn dev
Note:
If you use go version 1.18 for development and contributions, then please checkout the following issue. https://github.com/SigNoz/signoz/issues/1371
Docker Images
The docker images of query-service is available at https://hub.docker.com/r/signoz/query-service