-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
dont' overload `--metrics-host` and `--metrics-port` for push mode, instead use `--metrics-push-host` and `--metrics-push-port`. The former is inbound, the latter is outbound.
allow problematic shutdown.
@@ -674,6 +692,8 @@ MetricsConfiguration metricsConfiguration() { | |||
metricsConfiguration.setMode(metricsMode); | |||
metricsConfiguration.setHost(metricsHost.toString()); | |||
metricsConfiguration.setPort(metricsPort); | |||
metricsConfiguration.setPushHost(metricsPushHost.toString()); | |||
metricsConfiguration.setPushPort(metricsPushPort); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to throw an error if the user configures a set of host / port values that don't correspond to the chosen mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
picoCLI doesn't let us see what CLI flags there are, just the resulting values and a default is indistinguishable from a flag with a default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, no. Not with our current CLI/TOML library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be possible using what's in #679
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but will probably require a rework after merge with #679
CLI change - go to --metrics-push-* instead and get reid of --metrics-mode.
add error if both metrics and metrics-push are enabled.
I can't tell if using push enabled instead of a mode option is better for users. Otherwise the code looks correct given this initial choice. |
Adding new rules to #679 |
* Don't overload `--metrics-host` and `--metrics-port` for push mode, instead add '--metrics-push-enabled' , `--metrics-push-host` and `--metrics-push-port`, rename `--metrics-prometheus-job` to `--metrics-push-prometheus-job` and remove `--metrics-mode` * Show an error if both metrics and metrics-push are enabled. * Allow shutdown if we cannot communicate with the Push Gateway.
PR description
Don't overload
--metrics-host
and--metrics-port
for push mode,instead use
--metrics-push-host
and--metrics-push-port
. The formeris inbound, the latter is outbound.