File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 11# -- coding: UTF-8 --
22import os
3+ import socket
34
45worker_class = "gevent"
56workers = int (os .getenv ("WORKERS" , "4" ))
910loglevel = os .environ .get ("LOG_LEVEL" , "info" )
1011errorlog = os .environ .get ("ERROR_LOG" , "-" )
1112accesslog = os .environ .get ("ACCESS_LOG" , "-" )
13+
14+
15+ _statsd_host = os .getenv ("STATSD_HOST" )
16+ _statsd_port = os .getenv ("STATSD_PORT" )
17+ if _statsd_host and _statsd_port :
18+ statsd_host = f"{ _statsd_host } :{ _statsd_port } "
19+ statsd_prefix = socket .gethostname ()
Original file line number Diff line number Diff line change @@ -7,30 +7,38 @@ services:
77 - POSTGRES_DB=sentry
88 - POSTGRES_USER=sentry
99 - POSTGRES_PASSWORD=sentry
10+ profiles :
11+ - data
1012 ports :
1113 - 5432:5432
1214 volumes :
1315 - " controllerdata:/var/lib/postgresql/data"
1416
1517 redis :
1618 image : ' bitnami/redis:latest'
19+ profiles :
20+ - data
1721 environment :
1822 - ALLOW_EMPTY_PASSWORD=yes
1923 ports :
2024 - 6379:6379
2125
2226 static :
23- image : spklabs/sentry-dynamic-sampling-controller-static:latest
27+ image : spklabs/sentry-dynamic-sampling-controller-static:alpha
2428 ports :
2529 - 8081:80
30+ profiles :
31+ - app
2632 app :
27- image : spklabs/sentry-dynamic-sampling-controller:latest
33+ image : spklabs/sentry-dynamic-sampling-controller:alpha
2834 depends_on :
2935 - postgres
3036 - redis
3137 - static
3238 ports :
3339 - 8080:8000
40+ profiles :
41+ - app
3442 environment :
3543 - ENV=debug
3644 - SECRET_KEY="very_secret"
@@ -57,5 +65,17 @@ services:
5765 - OIDC_RP_SIGN_ALGO=RS256
5866 - STATIC_URL=http://localhost:8081/static
5967
68+ statsd-exporter :
69+ image : prom/statsd-exporter:v0.23.0
70+ ports :
71+ - " 9125:9125/udp"
72+ - " 9102:9102"
73+ profiles :
74+ - metrics
75+ volumes :
76+ - ./etc/statsd.conf:/statsd/statsd.conf
77+ command :
78+ - --statsd.mapping-config=/statsd/statsd.conf
79+
6080volumes :
6181 controllerdata :
Original file line number Diff line number Diff line change 1+ mappings:
2+ - match: "*.gunicorn.request.status.*"
3+ help: "gunicorn response code"
4+ name: "gunicorn_response_code"
5+ labels:
6+ app: "$1"
7+ status: "$2"
8+ - match: "*.gunicorn.workers"
9+ name: "gunicorn_workers"
10+ labels:
11+ app: "$1"
12+ - match: "*.gunicorn.requests"
13+ name: "gunicorn_requests"
14+ labels:
15+ app: "$1"
16+ - match: "*.gunicorn.request.duration"
17+ name: "gunicorn_request_duration"
18+ labels:
19+ app: "$1"
You can’t perform that action at this time.
0 commit comments