Skip to content

Commit

Permalink
Merge pull request #3777 from SigNoz/release/v0.32.0
Browse files Browse the repository at this point in the history
Release/v0.32.0
  • Loading branch information
prashant-shahi authored Oct 20, 2023
2 parents ad62106 + 7faab85 commit f12abfb
Show file tree
Hide file tree
Showing 131 changed files with 3,980 additions and 1,376 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# that they own.
* @ankitnayan

/frontend/ @palashgdev
/frontend/ @palashgdev @YounixM
/deploy/ @prashant-shahi
/sample-apps/ @prashant-shahi
**/query-service/ @srikanthccv
Expand Down
36 changes: 28 additions & 8 deletions deploy/docker-swarm/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ x-clickhouse-defaults: &clickhouse-defaults
soft: 262144
hard: 262144

x-clickhouse-depend: &clickhouse-depend
x-db-depend: &db-depend
depends_on:
- clickhouse
- otel-collector-migrator
# - clickhouse-2
# - clickhouse-3


services:
zookeeper-1:
image: bitnami/zookeeper:3.7.1
Expand Down Expand Up @@ -144,7 +146,7 @@ services:
condition: on-failure

query-service:
image: signoz/query-service:0.31.1
image: signoz/query-service:0.32.0
command:
[
"-config=/root/config/prometheus.yml",
Expand Down Expand Up @@ -181,10 +183,10 @@ services:
deploy:
restart_policy:
condition: on-failure
<<: *clickhouse-depend
<<: *db-depend

frontend:
image: signoz/frontend:0.31.1
image: signoz/frontend:0.32.0
deploy:
restart_policy:
condition: on-failure
Expand All @@ -197,15 +199,17 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector:
image: signoz/signoz-otel-collector:0.79.8
image: signoz/signoz-otel-collector:0.79.11
command:
[
"--config=/etc/otel-collector-config.yaml",
"--manager-config=/etc/manager-config.yaml",
"--feature-gates=-pkg.translator.prometheus.NormalizeName"
]
user: root # required for reading docker container logs
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name={{.Node.Hostname}},os.type={{.Node.Platform.OS}},dockerswarm.service.name={{.Service.Name}},dockerswarm.task.name={{.Task.Name}}
Expand All @@ -227,10 +231,26 @@ services:
mode: global
restart_policy:
condition: on-failure
<<: *clickhouse-depend
depends_on:
- clickhouse
- otel-collector-migrator
- query-service

otel-collector-migrator:
image: signoz/signoz-schema-migrator:0.79.11
deploy:
restart_policy:
condition: on-failure
delay: 5s
command:
- "--dsn=tcp://clickhouse:9000"
depends_on:
- clickhouse
# - clickhouse-2
# - clickhouse-3

otel-collector-metrics:
image: signoz/signoz-otel-collector:0.79.8
image: signoz/signoz-otel-collector:0.79.11
command:
[
"--config=/etc/otel-collector-metrics-config.yaml",
Expand All @@ -246,7 +266,7 @@ services:
deploy:
restart_policy:
condition: on-failure
<<: *clickhouse-depend
<<: *db-depend

logspout:
image: "gliderlabs/logspout:v3.2.14"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server_endpoint: ws://query-service:4320/v1/opamp
46 changes: 44 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose-core.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
version: "2.4"

services:
zookeeper-1:
image: bitnami/zookeeper:3.7.1
container_name: signoz-zookeeper-1
hostname: zookeeper-1
user: root
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
volumes:
- ./data/zookeeper-1:/bitnami/zookeeper
environment:
- ZOO_SERVER_ID=1
# - ZOO_SERVERS=0.0.0.0:2888:3888,zookeeper-2:2888:3888,zookeeper-3:2888:3888
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_AUTOPURGE_INTERVAL=1

clickhouse:
image: clickhouse/clickhouse-server:23.7.3-alpine
container_name: signoz-clickhouse
Expand All @@ -11,8 +28,11 @@ services:
volumes:
- ./clickhouse-config.xml:/etc/clickhouse-server/config.xml
- ./clickhouse-users.xml:/etc/clickhouse-server/users.xml
- ./custom-function.xml:/etc/clickhouse-server/custom-function.xml
- ./clickhouse-cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
# - ./clickhouse-storage.xml:/etc/clickhouse-server/config.d/storage.xml
- ./data/clickhouse/:/var/lib/clickhouse/
- ./user_scripts:/var/lib/clickhouse/user_scripts/
restart: on-failure
logging:
options:
Expand Down Expand Up @@ -45,18 +65,34 @@ services:
- --queryService.url=http://query-service:8085
- --storage.path=/data

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.79.11}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
depends_on:
clickhouse:
condition: service_healthy
# clickhouse-2:
# condition: service_healthy
# clickhouse-3:
# condition: service_healthy

# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`
otel-collector:
container_name: signoz-otel-collector
image: signoz/signoz-otel-collector:0.79.8
image: signoz/signoz-otel-collector:0.79.11
command:
[
"--config=/etc/otel-collector-config.yaml",
"--manager-config=/etc/manager-config.yaml",
"--copy-path=/var/tmp/collector-config.yaml",
"--feature-gates=-pkg.translator.prometheus.NormalizeName"
]
# user: root # required for reading docker container logs
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
ports:
Expand All @@ -75,10 +111,14 @@ services:
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully
query-service:
condition: service_healthy

otel-collector-metrics:
container_name: signoz-otel-collector-metrics
image: signoz/signoz-otel-collector:0.79.8
image: signoz/signoz-otel-collector:0.79.11
command:
[
"--config=/etc/otel-collector-metrics-config.yaml",
Expand All @@ -95,6 +135,8 @@ services:
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully

logspout:
image: "gliderlabs/logspout:v3.2.14"
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
query-service:
hostname: query-service
build:
context: "../../../pkg/query-service"
dockerfile: "./Dockerfile"
context: "../../../"
dockerfile: "./pkg/query-service/Dockerfile"
args:
LDFLAGS: ""
TARGETPLATFORM: "${GOOS}/${GOARCH}"
Expand Down
41 changes: 33 additions & 8 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ x-clickhouse-defaults: &clickhouse-defaults
soft: 262144
hard: 262144

x-clickhouse-depend: &clickhouse-depend
x-db-depend: &db-depend
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully
# clickhouse-2:
# condition: service_healthy
# clickhouse-3:
Expand Down Expand Up @@ -162,7 +164,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`

query-service:
image: signoz/query-service:${DOCKER_TAG:-0.31.1}
image: signoz/query-service:${DOCKER_TAG:-0.32.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -198,10 +200,10 @@ services:
interval: 30s
timeout: 5s
retries: 3
<<: *clickhouse-depend
<<: *db-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.31.1}
image: signoz/frontend:${DOCKER_TAG:-0.32.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -212,17 +214,34 @@ services:
volumes:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.79.11}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
depends_on:
clickhouse:
condition: service_healthy
# clickhouse-2:
# condition: service_healthy
# clickhouse-3:
# condition: service_healthy


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.8}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.11}
container_name: signoz-otel-collector
command:
[
"--config=/etc/otel-collector-config.yaml",
"--manager-config=/etc/manager-config.yaml",
"--copy-path=/var/tmp/collector-config.yaml",
"--feature-gates=-pkg.translator.prometheus.NormalizeName"
]
user: root # required for reading docker container logs
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
Expand All @@ -241,10 +260,16 @@ services:
# - "55678:55678" # OpenCensus receiver
# - "55679:55679" # zPages extension
restart: on-failure
<<: *clickhouse-depend
depends_on:
clickhouse:
condition: service_healthy
otel-collector-migrator:
condition: service_completed_successfully
query-service:
condition: service_healthy

otel-collector-metrics:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.8}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.11}
container_name: signoz-otel-collector-metrics
command:
[
Expand All @@ -259,7 +284,7 @@ services:
# - "13133:13133" # Health check extension
# - "55679:55679" # zPages extension
restart: on-failure
<<: *clickhouse-depend
<<: *db-depend

logspout:
image: "gliderlabs/logspout:v3.2.14"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server_endpoint: ws://query-service:4320/v1/opamp
2 changes: 1 addition & 1 deletion deploy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ else
echo ""
echo -e "🟢 Your frontend is running on http://localhost:3301"
echo ""
echo "ℹ️ By default, retention period is set to 7 days for logs and traces, and 30 days for metrics."
echo "ℹ️ By default, retention period is set to 15 days for logs and traces, and 30 days for metrics."
echo -e "To change this, navigate to the General tab on the Settings page of SigNoz UI. For more details, refer to https://signoz.io/docs/userguide/retention-period \n"

echo "ℹ️ To bring down SigNoz and clean volumes : $sudo_cmd docker-compose -f ./docker/clickhouse-setup/docker-compose.yaml down -v"
Expand Down
1 change: 1 addition & 0 deletions ee/query-service/app/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func (ah *APIHandler) RegisterRoutes(router *mux.Router, am *baseapp.AuthMiddlew

router.HandleFunc("/api/v1/checkout", am.AdminAccess(ah.checkout)).Methods(http.MethodPost)
router.HandleFunc("/api/v1/billing", am.AdminAccess(ah.getBilling)).Methods(http.MethodGet)
router.HandleFunc("/api/v1/portal", am.AdminAccess(ah.portalSession)).Methods(http.MethodPost)

router.HandleFunc("/api/v2/licenses",
am.ViewAccess(ah.listLicensesV2)).
Expand Down
9 changes: 5 additions & 4 deletions ee/query-service/app/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"

"github.com/gorilla/mux"
"go.uber.org/zap"

"go.signoz.io/signoz/ee/query-service/constants"
"go.signoz.io/signoz/ee/query-service/model"
"go.signoz.io/signoz/pkg/query-service/auth"
baseauth "go.signoz.io/signoz/pkg/query-service/auth"
basemodel "go.signoz.io/signoz/pkg/query-service/model"
"go.uber.org/zap"
)

func parseRequest(r *http.Request, req interface{}) error {
defer r.Body.Close()
requestBody, err := ioutil.ReadAll(r.Body)
requestBody, err := io.ReadAll(r.Body)
if err != nil {
return err
}
Expand Down Expand Up @@ -71,7 +72,7 @@ func (ah *APIHandler) registerUser(w http.ResponseWriter, r *http.Request) {
var req *baseauth.RegisterRequest

defer r.Body.Close()
requestBody, err := ioutil.ReadAll(r.Body)
requestBody, err := io.ReadAll(r.Body)
if err != nil {
zap.S().Errorf("received no input in api\n", err)
RespondError(w, model.BadRequest(err), nil)
Expand Down
Loading

0 comments on commit f12abfb

Please sign in to comment.