mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-24 05:04:27 +08:00

* chore: refactor: inject sqlx.DB into opamp.initDB instead of DB file name * chore: reorganize test utils a little * chore: add test validating pipelines for installed integrations show up in pipelines list * chore: get basic integration pipelines testcase passing * chore: reconcile experimental changes with latest state of develop * chore: add integration test for reordering of pipelines * chore: marker for integration pipelines using Id * chore: hookup propagation of installed integration pipelines by opamp * chore: add util for mapping slices * chore: add support for reordering integration pipelines * chore: exclude user saved integration pipelines if no longer installed * chore: flesh out rest of intgeration pipelines scenarios * chore: handle scenario when an integration is installed before any pipelines exist * chore: notify agentConf of update after uninstalling an integration * chore: some minor cleanup * chore: some more cleanup * chore: update ee server for changed controllers * chore: some more cleanup * chore: change builtin integration id prefix to avoid using colons that break yaml * chore: update builtin integration id in test
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.5
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 --prefer-delta=true
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