SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
refactor(ports): 💥 avoid exposing unnecessary ports and update frontend port to 3301 (#679)
Prashant Shahid22d1d1c3bc0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex b215b9d478..4c0e474b3a 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -36,7 +36,7 @@ If you don't want to install SigNoz backend just for doing frontend development,- `yarn install`- `yarn dev`-**_Frontend should now be accessible at `http://localhost:3000/application`_**+**_Frontend should now be accessible at `http://localhost:3301/application`_**# Contribute to Query-Service@@ -69,7 +69,7 @@ Need to update [https://github.com/SigNoz/charts](https://github.com/SigNoz/char- [minikube](https://minikube.sigs.k8s.io/docs/start/)- create a k8s cluster and make sure `kubectl` points to the locally created k8s cluster- run `helm install -n platform --create-namespace my-release charts/signoz` to install SigNoz chart-- run `kubectl -n platform port-forward svc/my-release-frontend 3000:3000` to make SigNoz UI available at [localhost:3000](http://localhost:3000)+- run `kubectl -n platform port-forward svc/my-release-frontend 3301:3301` to make SigNoz UI available at [localhost:3301](http://localhost:3301)**To load data with HotROD sample app:**diff --git a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml b/deploy/docker-swarm/clickhouse-setup/docker-compose.yamlindex 66afd79142..7313a96251 100644--- a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml+++ b/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml@@ -50,7 +50,7 @@ services:links:- "query-service"ports:- - "3000:3000"+ - "3301:3301"volumes:- ../common/nginx-config.conf:/etc/nginx/conf.d/default.confdiff --git a/deploy/docker-swarm/common/nginx-config.conf b/deploy/docker-swarm/common/nginx-config.confindex 881cdc77cb..f059d3972e 100644--- a/deploy/docker-swarm/common/nginx-config.conf+++ b/deploy/docker-swarm/common/nginx-config.conf@@ -1,5 +1,5 @@server {- listen 3000;+ listen 3301;server_name _;gzip on;diff --git a/deploy/docker/clickhouse-setup/docker-compose.arm.yaml b/deploy/docker/clickhouse-setup/docker-compose.arm.yamlindex 6f7a8912a7..cd68ead27f 100644--- a/deploy/docker/clickhouse-setup/docker-compose.arm.yaml+++ b/deploy/docker/clickhouse-setup/docker-compose.arm.yaml@@ -3,12 +3,6 @@ version: "2.4"services:clickhouse:image: altinity/clickhouse-server:21.12.3.32.altinitydev.arm- expose:- - 8123- - 9000- ports:- - 9001:9000- - 8123:8123volumes:- ./clickhouse-config.xml:/etc/clickhouse-server/config.xml- ./data/clickhouse/:/var/lib/clickhouse/@@ -27,15 +21,11 @@ services:command:- '--config.file=/prometheus/alertmanager.yml'- '--storage.path=/data'- ports:- - 9093:9093query-service:image: signoz/query-service:0.5.4container_name: query-servicecommand: ["-config=/root/config/prometheus.yml"]- ports:- - "8080:8080"volumes:- ./prometheus.yml:/root/config/prometheus.yml- ../dashboards:/root/config/dashboards@@ -54,10 +44,8 @@ services:container_name: frontenddepends_on:- query-service- links:- - "query-service"ports:- - "3000:3000"+ - "3301:3301"volumes:- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf@@ -67,16 +55,7 @@ services:volumes:- ./otel-collector-config.yaml:/etc/otel-collector-config.yamlports:- - "1777:1777" # pprof extension- - "8887:8888" # Prometheus metrics exposed by the agent- - "14268:14268" # Jaeger receiver- - "55678" # OpenCensus receiver- - "55680:55680" # OTLP HTTP/2.0 legacy port- - "55681:55681" # OTLP HTTP/1.0 receiver- "4317:4317" # OTLP GRPC receiver- - "55679:55679" # zpages extension- - "13133" # health_check- - "8889:8889" # prometheus exportermem_limit: 2000mrestart: alwaysdepends_on:@@ -95,8 +74,6 @@ services:hotrod:image: jaegertracing/example-hotrod:1.30container_name: hotrod- ports:- - "9000:8080"logging:options:max-size: 50m@@ -109,8 +86,6 @@ services:image: "grubykarol/locust:1.2.3-python3.9-alpine3.12"container_name: load-hotrodhostname: load-hotrod- ports:- - "8089:8089"environment:ATTACKED_HOST: http://hotrod:8080LOCUST_MODE: standalonediff --git a/deploy/docker/clickhouse-setup/docker-compose.yaml b/deploy/docker/clickhouse-setup/docker-compose.yamlindex 8621c77e12..e7c8b40ee3 100644--- a/deploy/docker/clickhouse-setup/docker-compose.yaml+++ b/deploy/docker/clickhouse-setup/docker-compose.yaml@@ -3,16 +3,9 @@ version: "2.4"services:clickhouse:image: yandex/clickhouse-server:21.12.3.32- expose:- - 8123- - 9000- ports:- - 9001:9000- - 8123:8123volumes:- ./clickhouse-config.xml:/etc/clickhouse-server/config.xml- ./data/clickhouse/:/var/lib/clickhouse/-healthcheck:# "clickhouse", "client", "-u ${CLICKHOUSE_USER}", "--password ${CLICKHOUSE_PASSWORD}", "-q 'SELECT 1'"test: ["CMD", "wget", "--spider", "-q", "localhost:8123/ping"]@@ -28,15 +21,11 @@ services:command:- '--config.file=/prometheus/alertmanager.yml'- '--storage.path=/data'- ports:- - 9093:9093query-service:image: signoz/query-service:0.5.4container_name: query-servicecommand: ["-config=/root/config/prometheus.yml"]- ports:- - "8080:8080"volumes:- ./prometheus.yml:/root/config/prometheus.yml- ../dashboards:/root/config/dashboards@@ -46,7 +35,6 @@ services:- STORAGE=clickhouse- GODEBUG=netdns=go- TELEMETRY_ENABLED=true-depends_on:clickhouse:condition: service_healthy@@ -56,10 +44,8 @@ services:container_name: frontenddepends_on:- query-service- links:- - "query-service"ports:- - "3000:3000"+ - "3301:3301"volumes:- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf@@ -69,16 +55,7 @@ services:volumes:- ./otel-collector-config.yaml:/etc/otel-collector-config.yamlports:- - "1777:1777" # pprof extension- - "8887:8888" # Prometheus metrics exposed by the agent- - "14268:14268" # Jaeger receiver- - "55678" # OpenCensus receiver- - "55680:55680" # OTLP HTTP/2.0 legacy port- - "55681:55681" # OTLP HTTP/1.0 receiver- "4317:4317" # OTLP GRPC receiver- - "55679:55679" # zpages extension- - "13133" # health_check- - "8889:8889" # prometheus exportermem_limit: 2000mrestart: alwaysdepends_on:@@ -97,8 +74,6 @@ services:hotrod:image: jaegertracing/example-hotrod:1.30container_name: hotrod- ports:- - "9000:8080"logging:options:max-size: 50m@@ -111,8 +86,6 @@ services:image: "grubykarol/locust:1.2.3-python3.9-alpine3.12"container_name: load-hotrodhostname: load-hotrod- ports:- - "8089:8089"environment:ATTACKED_HOST: http://hotrod:8080LOCUST_MODE: standalonediff --git a/deploy/docker/common/nginx-config.conf b/deploy/docker/common/nginx-config.confindex dd5eac0c83..3c7a9db8f0 100644--- a/deploy/docker/common/nginx-config.conf+++ b/deploy/docker/common/nginx-config.conf@@ -1,5 +1,5 @@server {- listen 3000;+ listen 3301;server_name _;gzip on;diff --git a/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml b/deploy/docker/druid-kafka-setup/docker-compose-tiny.yamlindex 5e4e82af1f..20ce14e822 100644--- a/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml+++ b/deploy/docker/druid-kafka-setup/docker-compose-tiny.yaml@@ -167,7 +167,8 @@ services:container_name: query-servicedepends_on:- - router+ router:+ condition: service_healthyports:- "8080:8080"volumes:@@ -180,10 +181,6 @@ services:- POSTHOG_API_KEY=H-htDCae7CR3RV57gUzmol6IAKtm5IMCvbcm_fwnL-w- GODEBUG=netdns=go- depends_on:- router:- condition: service_healthy-frontend:image: signoz/frontend:0.4.1container_name: frontend@@ -193,7 +190,7 @@ services:links:- "query-service"ports:- - "3000:3000"+ - "3301:3301"volumes:- ../common/nginx-config.conf:/etc/nginx/conf.d/default.confdiff --git a/deploy/docker/druid-kafka-setup/docker-compose.yaml b/deploy/docker/druid-kafka-setup/docker-compose.yamlindex a4ccf66af0..c47823492f 100644--- a/deploy/docker/druid-kafka-setup/docker-compose.yaml+++ b/deploy/docker/druid-kafka-setup/docker-compose.yaml@@ -162,7 +162,8 @@ services:container_name: query-servicedepends_on:- - router+ router:+ condition: service_healthyports:- "8080:8080"@@ -176,10 +177,6 @@ services:- POSTHOG_API_KEY=H-htDCae7CR3RV57gUzmol6IAKtm5IMCvbcm_fwnL-w- GODEBUG=netdns=go- depends_on:- router:- condition: service_healthy-frontend:image: signoz/frontend:0.4.1container_name: frontend@@ -189,7 +186,7 @@ services:links:- "query-service"ports:- - "3000:3000"+ - "3301:3301"volumes:- ./nginx-config.conf:/etc/nginx/conf.d/default.confdiff --git a/deploy/install.sh b/deploy/install.shindex 54bef5d067..2ee9983ff1 100755--- a/deploy/install.sh+++ b/deploy/install.sh@@ -102,7 +102,7 @@ check_os() {# The script should error out in case they aren't availablecheck_ports_occupied() {local port_check_output- local ports_pattern="80|3000|8080"+ local ports_pattern="80|3301|8080"if is_mac; thenport_check_output="$(netstat -anp tcp | awk '$6 == "LISTEN" && $4 ~ /^.*\.('"$ports_pattern"')$/')"@@ -225,7 +225,7 @@ wait_for_containers_start() {# The while loop is important because for-loops don't work for dynamic valueswhile [[ $timeout -gt 0 ]]; do- status_code="$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/api/v1/services/list || true)"+ status_code="$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3301/api/v1/services/list || true)"if [[ status_code -eq 200 ]]; thenbreakelse@@ -492,7 +492,7 @@ elseecho ""echo "🟢 Your installation is complete!"echo ""- echo -e "🟢 Your frontend is running on http://localhost:3000"+ echo -e "🟢 Your frontend is running on http://localhost:3301"echo ""if [ $setup_type == 'clickhouse' ]; thendiff --git a/frontend/Dockerfile b/frontend/Dockerfileindex ce3d7022ef..0fb029f5f3 100644--- a/frontend/Dockerfile+++ b/frontend/Dockerfile@@ -32,6 +32,6 @@ RUN rm -rf /usr/share/nginx/html/*# Copy from the stahg 1COPY --from=builder /frontend/build /usr/share/nginx/html-EXPOSE 3000+EXPOSE 3301ENTRYPOINT ["nginx", "-g", "daemon off;"]\ No newline at end of filediff --git a/frontend/README.md b/frontend/README.mdindex 34269bf73a..99a36710cb 100644--- a/frontend/README.md+++ b/frontend/README.md@@ -44,7 +44,7 @@ In the project directory, you can run:### `yarn start`Runs the app in the development mode.\-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.+Open [http://localhost:3301](http://localhost:3301) to view it in the browser.The page will reload if you make edits.\You will also see any lint errors in the console.diff --git a/frontend/conf/default.conf b/frontend/conf/default.confindex ec9fb99d70..dc0475eaf4 100644--- a/frontend/conf/default.conf+++ b/frontend/conf/default.conf@@ -1,5 +1,5 @@server {- listen 3000;+ listen 3301;server_name _;gzip on;diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.ymlindex 2a451ded94..8bc085de40 100644--- a/frontend/docker-compose.yml+++ b/frontend/docker-compose.yml@@ -4,4 +4,4 @@ services:build: .image: signoz/frontend:latestports:- - "3000:3000"+ - "3301:3301"diff --git a/frontend/webpack.config.js b/frontend/webpack.config.jsindex 4e27524146..3c2b8488fe 100644--- a/frontend/webpack.config.js+++ b/frontend/webpack.config.js@@ -35,7 +35,7 @@ const config = {open: true,hot: true,liveReload: true,- port: portFinderSync.getPort(3000),+ port: portFinderSync.getPort(3301),static: {directory: resolve(__dirname, 'public'),publicPath: '/',diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.goindex ba20131876..ab124de5e9 100644--- a/pkg/query-service/app/clickhouseReader/reader.go+++ b/pkg/query-service/app/clickhouseReader/reader.go@@ -168,7 +168,7 @@ func (r *ClickHouseReader) Start() {notifier := notifier.NewManager(&cfg.notifier, log.With(logger, "component", "notifier"))// notifier.ApplyConfig(conf)- ExternalURL, err := computeExternalURL("", "0.0.0.0:3000")+ ExternalURL, err := computeExternalURL("", "0.0.0.0:3301")if err != nil {fmt.Fprintln(os.Stderr, errors.Wrapf(err, "parse external URL %q", ExternalURL.String()))os.Exit(2)