mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add enable_statsd_middleware option so that backend execution timing can be sent to statsd without enabling web request timing.
This commit is contained in:
@@ -3325,6 +3325,20 @@
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``enable_statsd_middleware``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Default is true if statsd_host is set. Enable the statsd
|
||||
middleware. If false and statsd_host is also set, only timing of
|
||||
certain performance-critical backend tasks (e.g. the job handler
|
||||
monitor loop time) data will be sent to statsd, but not web
|
||||
request timing.
|
||||
:Default: ``false``
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~
|
||||
``statsd_host``
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1922,6 +1922,12 @@ galaxy:
|
||||
# self-signed certificate.
|
||||
#sentry_ca_certs: null
|
||||
|
||||
# Default is true if statsd_host is set. Enable the statsd middleware.
|
||||
# If false and statsd_host is also set, only timing of certain
|
||||
# performance-critical backend tasks (e.g. the job handler monitor
|
||||
# loop time) data will be sent to statsd, but not web request timing.
|
||||
#enable_statsd_middleware: false
|
||||
|
||||
# Log to statsd Statsd is an external statistics aggregator
|
||||
# (https://github.com/etsy/statsd) Enabling the following options will
|
||||
# cause galaxy to log request timing and other statistics to the
|
||||
|
||||
@@ -2448,6 +2448,17 @@ mapping:
|
||||
Use this option to provide the path to location of the CA (Certificate Authority)
|
||||
certificate file if the sentry server uses a self-signed certificate.
|
||||
|
||||
enable_statsd_middleware:
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
desc: |
|
||||
Default is true if statsd_host is set.
|
||||
Enable the statsd middleware. If false and statsd_host is also set,
|
||||
only timing of certain performance-critical backend tasks (e.g. the
|
||||
job handler monitor loop time) data will be sent to statsd, but not
|
||||
web request timing.
|
||||
|
||||
statsd_host:
|
||||
type: str
|
||||
required: false
|
||||
|
||||
@@ -1023,7 +1023,8 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf):
|
||||
# other middleware):
|
||||
app = wrap_if_allowed(app, stack, httpexceptions.make_middleware, name="paste.httpexceptions", args=(conf,))
|
||||
# Statsd request timing and profiling
|
||||
if statsd_host := conf.get("statsd_host", None):
|
||||
statsd_host = conf.get("statsd_host", None)
|
||||
if statsd_host and conf.get("enable_statsd_middleware", statsd_host is not None):
|
||||
from galaxy.web.framework.middleware.statsd import StatsdMiddleware
|
||||
|
||||
app = wrap_if_allowed(
|
||||
|
||||
Reference in New Issue
Block a user