Skip to content

Commit

Permalink
Configure gunicorn to emit statsd metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Jun 18, 2024
1 parent 95d4c17 commit 63726ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/run_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ GUNICORN_WORKER_CLASS=${GUNICORN_WORKER_CLASS:-"sync"}
GUNICORN_MAX_REQUESTS=${GUNICORN_MAX_REQUESTS:-"0"}
GUNICORN_MAX_REQUESTS_JITTER=${GUNICORN_MAX_REQUESTS_JITTER:-"0"}
CMD_PREFIX=${CMD_PREFIX:-""}
STATSD_HOST=${STATSD_HOST:-localhost}
STATSD_PORT=${STATSD_PORT:-8125}
HOSTNAME=${HOSTNAME:-$(hostname)}

${CMD_PREFIX} gunicorn \
--workers="${GUNICORN_WORKERS}" \
--worker-class="${GUNICORN_WORKER_CLASS}" \
--max-requests="${GUNICORN_MAX_REQUESTS}" \
--max-requests-jitter="${GUNICORN_MAX_REQUESTS_JITTER}" \
--statsd-host=${STATSD_HOST}:${STATSD_PORT} \
--statsd-prefix=socorro.collector \
--dogstatsd-tags=host:$HOSTNAME \
--log-file=- \
--error-logfile=- \
--access-logfile=- \
Expand Down

0 comments on commit 63726ab

Please sign in to comment.