You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal: add support for an enabled: true/false field, both at the metrics level and for each reporter. This can then be used together with environment variable interpolation. For example:
metrics:
enabled: ${ENABLE_METRICS:-false}
will cause the metrics to be disabled, unless there's an ENABLE_METRICS=true environment variable set. On test and live environments this env var could be set to true.
This discussion was converted from issue #9532 on October 23, 2024 09:59.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there is no way to disable the metrics via the config file.
As soon as a valid metrics entry is added (https://www.dropwizard.io/en/stable/manual/configuration.html#metrics), the metrics will be enabled. The problem is, when testing on localhost, one may not want the metrics to be reported.
Proposal: add support for an enabled: true/false field, both at the metrics level and for each reporter. This can then be used together with environment variable interpolation. For example:
will cause the metrics to be disabled, unless there's an ENABLE_METRICS=true environment variable set. On test and live environments this env var could be set to true.
If this is an useful idea, I could create a PR.
Beta Was this translation helpful? Give feedback.
All reactions