Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/7077 | Related metrics api #7149

Open
wants to merge 36 commits into
base: feat/7080
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f6ac729
feat(summary view): added metric details apis | 7082
aniketio-ctrl Feb 11, 2025
9385029
feat(summary view): added metric details apis | 7082
aniketio-ctrl Feb 11, 2025
0ca886e
feat(summary view): added list metric details apis | 7084
aniketio-ctrl Feb 11, 2025
bab1399
feat(summary view): added tree map metric details apis | 7087
aniketio-ctrl Feb 11, 2025
9676b7e
feat(summary view): added list metric details apis | 7084
aniketio-ctrl Feb 12, 2025
969d6b0
feat(summary): updated contribution queries for metric metadata| 7082
aniketio-ctrl Feb 13, 2025
2a53b95
Merge branch 'feat/7080' of github.com:SigNoz/signoz into feat/7082
aniketio-ctrl Feb 13, 2025
51794ba
Merge branch 'feat/7082' of github.com:SigNoz/signoz into feat/7084
aniketio-ctrl Feb 13, 2025
d4bdcb1
feat(summary): added which table to use functions| 7084
aniketio-ctrl Feb 13, 2025
03d9c62
feat(summary): added clickhouse settings| 7084
aniketio-ctrl Feb 16, 2025
bba49c1
Merge branch 'feat/7084' of github.com:SigNoz/signoz into feat/7087
aniketio-ctrl Feb 16, 2025
3e43a96
feat(summary): added clickhouse settings| 7087
aniketio-ctrl Feb 16, 2025
7394c06
feat(summary): added clickhouse queries| 7082
aniketio-ctrl Feb 16, 2025
43a3122
feat(explorer): added clickhouse queries| 7077
aniketio-ctrl Feb 16, 2025
8149bb5
feat(explorer): added clickhouse queries| 7077
aniketio-ctrl Feb 17, 2025
d83daa6
feat(summary): removed cardinality from metadata | 7082
aniketio-ctrl Feb 17, 2025
a41d413
Merge branch 'feat/7082' of github.com:SigNoz/signoz into feat/7084
aniketio-ctrl Feb 17, 2025
08b9e9b
feat(summary): updated list metrics api into two parts| 7084
aniketio-ctrl Feb 17, 2025
4590195
feat(summary): added default values for list api| 7084
aniketio-ctrl Feb 17, 2025
e7269bb
Merge branch 'feat/7084' of github.com:SigNoz/signoz into feat/7087
aniketio-ctrl Feb 17, 2025
ea4c7ac
feat(summary): updated tree map samples query into two parts| 7087
aniketio-ctrl Feb 18, 2025
c1f86b1
feat(summary): updated tree map samples query into two parts| 7087
aniketio-ctrl Feb 18, 2025
bc61850
Merge branch 'feat/7087' of github.com:SigNoz/signoz into feat/7077_1
aniketio-ctrl Feb 18, 2025
c5459f3
feat(explorer): updated related metrics query| 7077
aniketio-ctrl Feb 18, 2025
e2ccc5c
feat(explorer): added clickhouse max threads settings| 7077
aniketio-ctrl Feb 18, 2025
4809dc0
Merge branch 'feat/7080' of github.com:SigNoz/signoz into feat/7077_1
aniketio-ctrl Feb 18, 2025
d91e7c1
feat(explorer): added clickhouse max threads settings| 7077
aniketio-ctrl Feb 18, 2025
843d9e1
feat(explorer): added clickhouse max threads settings| 7077
aniketio-ctrl Feb 18, 2025
baebb13
feat(explorer): added clickhouse max threads settings| 7077
aniketio-ctrl Feb 18, 2025
a70cf32
feat(explorer): added query range with related metrics api| 7077
aniketio-ctrl Feb 19, 2025
211b0b9
feat(explorer): added distributed ts table and query builder| 7077
aniketio-ctrl Feb 20, 2025
c2bb82f
Merge branch 'feat/7077_1' of github.com:SigNoz/signoz into feat/7077_1
aniketio-ctrl Feb 20, 2025
e87753a
Merge branch 'feat/7080' into feat/7077_1
aniketio-ctrl Feb 20, 2025
bded71e
feat(explorer): improved clickhouse queries
aniketio-ctrl Feb 22, 2025
f094fb3
Merge branch 'feat/7077_1' of github.com:SigNoz/signoz into feat/7077_1
aniketio-ctrl Feb 22, 2025
ead25be
feat(explorer): improved clickhouse queries
aniketio-ctrl Feb 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge branch 'feat/7080' of github.com:SigNoz/signoz into feat/7077_1
  • Loading branch information
aniketio-ctrl committed Feb 18, 2025
commit 4809dc064fb6daeb49b55c86dea59eeb1ab8497d
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
.vscode
README.md
deploy
sample-apps
sample-apps

# frontend
node_modules
35 changes: 35 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: goreleaser

on:
push:
tags:
- v*
- histogram-quantile/v*

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
workdirs:
- scripts/clickhouse/histogramquantile
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set-up-go
uses: actions/setup-go@v5
- name: run-goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: '~> v2'
args: release --clean
workdir: ${{ matrix.workdirs }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
19 changes: 0 additions & 19 deletions .github/workflows/pr_verify_linked_issue.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/prereleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: prereleaser

on:
# schedule every wednesday 9:30 AM UTC (3pm IST)
schedule:
- cron: '30 9 * * 3'

# allow manual triggering of the workflow by a maintainer
workflow_dispatch:
inputs:
release_type:
description: "Type of the release"
type: choice
required: true
options:
- 'patch'
- 'minor'
- 'major'

jobs:
verify:
uses: signoz/primus.workflows/.github/workflows/github-verify.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GITHUB_TEAM_NAME: releaser
GITHUB_MEMBER_NAME: ${{ github.actor }}
signoz:
if: ${{ always() && (needs.verify.result == 'success' || github.event.name == 'schedule') }}
uses: signoz/primus.workflows/.github/workflows/releaser.yaml@main
secrets: inherit
needs: [verify]
with:
PRIMUS_REF: main
PROJECT_NAME: signoz
RELEASE_TYPE: ${{ inputs.release_type || 'minor' }}
13 changes: 13 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create .env file
run: |
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
echo 'SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> frontend/.env
echo 'SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> frontend/.env
echo 'SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> frontend/.env
echo 'SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> frontend/.env
echo 'TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> frontend/.env
echo 'TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> frontend/.env
echo 'POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> frontend/.env
echo 'CUSTOMERIO_ID="${{ secrets.CUSTOMERIO_ID }}"' >> frontend/.env
echo 'CUSTOMERIO_SITE_ID="${{ secrets.CUSTOMERIO_SITE_ID }}"' >> frontend/.env
- name: Setup golang
uses: actions/setup-go@v4
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: releaser

on:
# trigger on new latest release
release:
types: [published]

jobs:
detect:
if: ${{ !startsWith(github.event.release.tag_name, 'histogram-quantile/') }}
runs-on: ubuntu-latest
outputs:
release_type: ${{ steps.find.outputs.release_type }}
steps:
- id: find
name: find
run: |
release_tag=${{ github.event.release.tag_name }}
patch_number=$(echo $release_tag | awk -F. '{print $3}')
release_type="minor"
if [[ $patch_number -ne 0 ]]; then
release_type="patch"
fi
echo "release_type=${release_type}" >> "$GITHUB_OUTPUT"
charts:
if: ${{ !startsWith(github.event.release.tag_name, 'histogram-quantile/') }}
uses: signoz/primus.workflows/.github/workflows/github-trigger.yaml@main
secrets: inherit
needs: [detect]
with:
PRIMUS_REF: main
GITHUB_REPOSITORY_NAME: charts
GITHUB_EVENT_NAME: prereleaser
GITHUB_EVENT_PAYLOAD: "{\"release_type\": \"${{ needs.detect.outputs.release_type }}\"}"
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ee/query-service/tests/test-deploy/data/
/deploy/docker/clickhouse-setup/data/
/deploy/docker-swarm/clickhouse-setup/data/
bin/

.local/
*/query-service/queries.active

# e2e
Expand All @@ -70,3 +70,9 @@ vendor/

# git-town
.git-branches.toml

# goreleaser
dist/

# ignore user_scripts that is fetched by init-clickhouse
deploy/common/clickhouse/user_scripts/
10 changes: 2 additions & 8 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@


tasks:
- name: Run Script to Comment ut required lines
init: |
cd ./.scripts
sh commentLinesForSetup.sh

- name: Run Docker Images
init: |
cd ./deploy
sudo docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d
# command:
cd ./deploy/docker
sudo docker compose up -d

- name: Run Frontend
init: |
Expand Down
35 changes: 14 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,24 +141,24 @@ Depending upon your area of expertise & interest, you can choose one or more to

# 3. Develop Frontend 🌚

**Need to Update: [https://github.com/SigNoz/signoz/tree/develop/frontend](https://github.com/SigNoz/signoz/tree/develop/frontend)**
**Need to Update: [https://github.com/SigNoz/signoz/tree/main/frontend](https://github.com/SigNoz/signoz/tree/main/frontend)**

Also, have a look at [Frontend README.md](https://github.com/SigNoz/signoz/blob/develop/frontend/README.md) sections for more info on how to setup SigNoz frontend locally (with and without Docker).
Also, have a look at [Frontend README.md](https://github.com/SigNoz/signoz/blob/main/frontend/README.md) sections for more info on how to setup SigNoz frontend locally (with and without Docker).

## 3.1 Contribute to Frontend with Docker installation of SigNoz

- Clone the SigNoz repository and cd into signoz directory,
```
git clone https://github.com/SigNoz/signoz.git && cd signoz
```
- Comment out `frontend` service section at [`deploy/docker/clickhouse-setup/docker-compose.yaml#L68`](https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L68)
- Comment out `frontend` service section at [`deploy/docker/docker-compose.yaml#L68`](https://github.com/SigNoz/signoz/blob/main/deploy/docker/docker-compose.yaml#L68)

![develop-frontend](https://user-images.githubusercontent.com/52788043/179009217-6692616b-17dc-4d27-b587-9d007098d739.jpeg)


- run `cd deploy` to move to deploy directory,
- Install signoz locally **without** the frontend,
- Add / Uncomment the below configuration to query-service section at [`deploy/docker/clickhouse-setup/docker-compose.yaml#L47`](https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L47)
- Add / Uncomment the below configuration to query-service section at [`deploy/docker/docker-compose.yaml#L47`](https://github.com/SigNoz/signoz/blob/main/deploy/docker/docker-compose.yaml#L47)
```
ports:
- "8080:8080"
Expand All @@ -167,9 +167,10 @@ Also, have a look at [Frontend README.md](https://github.com/SigNoz/signoz/blob/

- Next run,
```
sudo docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d
cd deploy/docker
sudo docker compose up -d
```
- `cd ../frontend` and change baseURL in file [`frontend/src/constants/env.ts#L2`](https://github.com/SigNoz/signoz/blob/develop/frontend/src/constants/env.ts#L2) and for that, you need to create a `.env` file in the `frontend` directory with the following environment variable (`FRONTEND_API_ENDPOINT`) matching your configuration.
- `cd ../frontend` and change baseURL in file [`frontend/src/constants/env.ts#L2`](https://github.com/SigNoz/signoz/blob/main/frontend/src/constants/env.ts#L2) and for that, you need to create a `.env` file in the `frontend` directory with the following environment variable (`FRONTEND_API_ENDPOINT`) matching your configuration.

If you have backend api exposed via frontend nginx:
```
Expand All @@ -186,11 +187,6 @@ Also, have a look at [Frontend README.md](https://github.com/SigNoz/signoz/blob/
yarn dev
```

### Important Notes:
The Maintainers / Contributors who will change Line Numbers of `Frontend` & `Query-Section`, please update line numbers in [`/.scripts/commentLinesForSetup.sh`](https://github.com/SigNoz/signoz/blob/develop/.scripts/commentLinesForSetup.sh)

**[`^top^`](#contributing-guidelines)**

## 3.2 Contribute to Frontend without installing SigNoz backend

If you don't want to install the SigNoz backend just for doing frontend development, we can provide you with test environments that you can use as the backend.
Expand All @@ -216,7 +212,7 @@ Please ping us in the [`#contributing`](https://signoz-community.slack.com/archi

# 4. Contribute to Backend (Query-Service) 🌑

**Need to Update: [https://github.com/SigNoz/signoz/tree/develop/pkg/query-service](https://github.com/SigNoz/signoz/tree/develop/pkg/query-service)**
**Need to Update: [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](https://github.com/SigNoz/signoz/tree/main/pkg/query-service)**

## 4.1 Prerequisites

Expand All @@ -242,13 +238,13 @@ Please ping us in the [`#contributing`](https://signoz-community.slack.com/archi
git clone https://github.com/SigNoz/signoz.git && cd signoz
```
- run `sudo make dev-setup` to configure local setup to run query-service,
- Comment out `frontend` service section at [`deploy/docker/clickhouse-setup/docker-compose.yaml#L68`](https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L68)
- Comment out `frontend` service section at [`deploy/docker/docker-compose.yaml#L68`](https://github.com/SigNoz/signoz/blob/main/deploy/docker/docker-compose.yaml#L68)
<img width="982" alt="develop-frontend" src="https://user-images.githubusercontent.com/52788043/179043977-012be8b0-a2ed-40d1-b2e6-2ab72d7989c0.png">

- Comment out `query-service` section at [`deploy/docker/clickhouse-setup/docker-compose.yaml#L41`,](https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L41)
- Comment out `query-service` section at [`deploy/docker/docker-compose.yaml#L41`,](https://github.com/SigNoz/signoz/blob/main/deploy/docker/docker-compose.yaml#L41)
<img width="1068" alt="Screenshot 2022-07-14 at 22 48 07" src="https://user-images.githubusercontent.com/52788043/179044151-a65ba571-db0b-4a16-b64b-ca3fadcf3af0.png">

- add below configuration to `clickhouse` section at [`deploy/docker/clickhouse-setup/docker-compose.yaml`,](https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml)
- add below configuration to `clickhouse` section at [`deploy/docker/docker-compose.yaml`,](https://github.com/SigNoz/signoz/blob/main/deploy/docker/docker-compose.yaml)
```
ports:
- 9001:9000
Expand All @@ -258,9 +254,9 @@ Please ping us in the [`#contributing`](https://signoz-community.slack.com/archi
- run `cd pkg/query-service/` to move to `query-service` directory,
- Then, you need to create a `.env` file with the following environment variable
```
SIGNOZ_LOCAL_DB_PATH="./signoz.db"
SIGNOZ_SQLSTORE_SQLITE_PATH="./signoz.db"
```
to set your local environment with the right `RELATIONAL_DATASOURCE_PATH` as mentioned in [`./constants/constants.go#L38`,](https://github.com/SigNoz/signoz/blob/develop/pkg/query-service/constants/constants.go#L38)
to set your local environment with the right `RELATIONAL_DATASOURCE_PATH` as mentioned in [`./constants/constants.go#L38`,](https://github.com/SigNoz/signoz/blob/main/pkg/query-service/constants/constants.go#L38)

- Now, 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`
Expand Down Expand Up @@ -294,13 +290,10 @@ docker pull signoz/query-service:develop
```

### Important Note:
The Maintainers / Contributors who will change Line Numbers of `Frontend` & `Query-Section`, please update line numbers in [`/.scripts/commentLinesForSetup.sh`](https://github.com/SigNoz/signoz/blob/develop/.scripts/commentLinesForSetup.sh)



**Query Service should now be available at** [`http://localhost:8080`](http://localhost:8080)

If you want to see how the frontend plays with query service, you can run the frontend also in your local env with the baseURL changed to `http://localhost:8080` in file [`frontend/src/constants/env.ts`](https://github.com/SigNoz/signoz/blob/develop/frontend/src/constants/env.ts) as the `query-service` is now running at port `8080`.
If you want to see how the frontend plays with query service, you can run the frontend also in your local env with the baseURL changed to `http://localhost:8080` in file [`frontend/src/constants/env.ts`](https://github.com/SigNoz/signoz/blob/main/frontend/src/constants/env.ts) as the `query-service` is now running at port `8080`.

<!-- Instead of configuring a local setup, you can also use [Gitpod](https://www.gitpod.io/), a VSCode-based Web IDE.

Expand Down
33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ DEV_BUILD ?= "" # set to any non-empty value to enable dev build
FRONTEND_DIRECTORY ?= frontend
QUERY_SERVICE_DIRECTORY ?= pkg/query-service
EE_QUERY_SERVICE_DIRECTORY ?= ee/query-service
STANDALONE_DIRECTORY ?= deploy/docker/clickhouse-setup
SWARM_DIRECTORY ?= deploy/docker-swarm/clickhouse-setup
STANDALONE_DIRECTORY ?= deploy/docker
SWARM_DIRECTORY ?= deploy/docker-swarm
CH_HISTOGRAM_QUANTILE_DIRECTORY ?= scripts/clickhouse/histogramquantile

GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
Expand Down Expand Up @@ -98,12 +99,12 @@ build-query-service-static-arm64:

# Steps to build static binary of query service for all platforms
.PHONY: build-query-service-static-all
build-query-service-static-all: build-query-service-static-amd64 build-query-service-static-arm64
build-query-service-static-all: build-query-service-static-amd64 build-query-service-static-arm64 build-frontend-static

# Steps to build and push docker image of query service
.PHONY: build-query-service-amd64 build-push-query-service
# Step to build docker image of query service in amd64 (used in build pipeline)
build-query-service-amd64: build-query-service-static-amd64
build-query-service-amd64: build-query-service-static-amd64 build-frontend-static
@echo "------------------"
@echo "--> Building query-service docker image for amd64"
@echo "------------------"
Expand Down Expand Up @@ -142,16 +143,6 @@ dev-setup:
@echo "--> Local Setup completed"
@echo "------------------"

run-local:
@docker-compose -f \
$(STANDALONE_DIRECTORY)/docker-compose-core.yaml -f $(STANDALONE_DIRECTORY)/docker-compose-local.yaml \
up --build -d

down-local:
@docker-compose -f \
$(STANDALONE_DIRECTORY)/docker-compose-core.yaml -f $(STANDALONE_DIRECTORY)/docker-compose-local.yaml \
down -v

pull-signoz:
@docker-compose -f $(STANDALONE_DIRECTORY)/docker-compose.yaml pull

Expand Down Expand Up @@ -190,4 +181,16 @@ check-no-ee-references:
fi

test:
go test ./pkg/query-service/...
go test ./pkg/...

goreleaser-snapshot:
@if [[ ${GORELEASER_WORKDIR} ]]; then \
cd ${GORELEASER_WORKDIR} && \
goreleaser release --clean --snapshot; \
cd -; \
else \
goreleaser release --clean --snapshot; \
fi

goreleaser-snapshot-histogram-quantile:
make GORELEASER_WORKDIR=$(CH_HISTOGRAM_QUANTILE_DIRECTORY) goreleaser-snapshot
6 changes: 3 additions & 3 deletions README.de-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

<h3 align="center">
<a href="https://signoz.io/docs"><b>Dokumentation</b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/develop/README.md"><b>Readme auf Englisch </b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/develop/README.zh-cn.md"><b>ReadMe auf Chinesisch</b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/develop/README.pt-br.md"><b>ReadMe auf Portugiesisch</b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/main/README.md"><b>Readme auf Englisch </b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/main/README.zh-cn.md"><b>ReadMe auf Chinesisch</b></a> &bull;
<a href="https://github.com/SigNoz/signoz/blob/main/README.pt-br.md"><b>ReadMe auf Portugiesisch</b></a> &bull;
<a href="https://signoz.io/slack"><b>Slack Community</b></a> &bull;
<a href="https://twitter.com/SigNozHq"><b>Twitter</b></a>
</h3>
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.