Skip to content

Commit

Permalink
dont run signoz in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasul Kireev committed Jun 21, 2023
1 parent 632137f commit 6510d83
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include builtwithdjango/.env

runserver:
DJANGO_SETTINGS_MODULE=builtwithdjango.settings
OTEL_RESOURCE_ATTRIBUTES=service.name=bwd_local
OTEL_EXPORTER_OTLP_ENDPOINT="$(SIGNOZ_OTEL_COLLECTOR)"
poetry run opentelemetry-instrument \
--traces_exporter otlp_proto_http \
--metrics_exporter otlp_proto_http \
python manage.py runserver --noreload
.PHONY: runserver
13 changes: 7 additions & 6 deletions deployment/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

opentelemetry-bootstrap -a install
# opentelemetry-bootstrap -a install

python manage.py collectstatic --noinput
python manage.py migrate
Expand All @@ -10,9 +10,10 @@ python manage.py qcluster &

DJANGO_SETTINGS_MODULE=builtwithdjango.settings
OTEL_RESOURCE_ATTRIBUTES=service.name=builtwithdjango
OTEL_EXPORTER_OTLP_ENDPOINT="$SIGNOZ_OTEL_COLLECTOR:4317"
OTEL_EXPORTER_OTLP_ENDPOINT="$SIGNOZ_OTEL_COLLECTOR"

opentelemetry-instrument \
--traces_exporter otlp_proto_http \
--metrics_exporter otlp_proto_http \
gunicorn -c gunicorn.config.py --bind 0.0.0.0:80 --workers 3 --threads 2 builtwithdjango.wsgi:application
# opentelemetry-instrument \
# --traces_exporter otlp_proto_http \
# --metrics_exporter otlp_proto_http \

gunicorn -c gunicorn.config.py --bind 0.0.0.0:80 --workers 3 --threads 2 builtwithdjango.wsgi:application

0 comments on commit 6510d83

Please sign in to comment.