Disable stacksampler by default

It causes problems due to the sheer number of unique metrics emitted, which makes
the prometheus endpoint be very expensive / fail a lot.

The data is not useful enough to justify the cost.
pull/191/head
Mike Lang 4 years ago committed by Mike Lang
parent 6d55f01de6
commit b029250c1c

@ -194,10 +194,11 @@ def install_stacksampler(interval=0.005):
We could use user+sys time but that leads to interrupting syscalls,
which may affect performance, and we care mostly about user time anyway.
"""
if os.environ.get('WUBLOADER_DISABLE_STACKSAMPLER', '').lower() == 'true':
logging.info("Not installing stacksampler - disabled by WUBLOADER_DISABLE_STACKSAMPLER env var")
if os.environ.get('WUBLOADER_ENABLE_STACKSAMPLER', '').lower() != 'true':
return
logging.info("Installing stacksampler")
# Note we only start each next timer once the previous timer signal has been processed.
# There are two reasons for this:
# 1. Avoid handling a signal while already handling a signal, however unlikely,

@ -151,8 +151,8 @@
env:: {
// Uncomment this to set log level to debug
// WUBLOADER_LOG_LEVEL: "DEBUG",
// Uncomment this to disable stacksampling performance monitoring
// WUBLOADER_DISABLE_STACKSAMPLER: "true",
// Uncomment this to enable stacksampling performance monitoring
// WUBLOADER_ENABLE_STACKSAMPLER: "true",
},
// Now for the actual docker-compose config

@ -86,8 +86,8 @@
env: {
// Uncomment this to set log level to debug
// WUBLOADER_LOG_LEVEL: "DEBUG",
// Uncomment this to disable stacksampling performance monitoring
// WUBLOADER_DISABLE_STACKSAMPLER: "true",
// Uncomment this to enable stacksampling performance monitoring
// WUBLOADER_ENABLE_STACKSAMPLER: "true",
},
// Config for cutter upload locations. See cutter docs for full detail.

Loading…
Cancel
Save