-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix api listen port config var #1110
Conversation
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.
It feels like there is a separation of domains here where a user may want access to debug profiles via pprof or a user may want to be able to scrape metrics from the relayer via prom. Perhaps it doesn't matter that we are serving both of those use cases via one address but i'd be interested to hear @mark-rushakoff's thoughts on this.
cmd/flags.go
Outdated
@@ -332,7 +332,7 @@ func dstPortFlag(v *viper.Viper, cmd *cobra.Command) *cobra.Command { | |||
} | |||
|
|||
func debugServerFlags(v *viper.Viper, cmd *cobra.Command) *cobra.Command { | |||
cmd.Flags().String(flagDebugAddr, defaultDebugAddr, "address to use for debug server. Set empty to disable debug server.") | |||
cmd.Flags().String(flagDebugAddr, "", "address to use for debug server. Set empty to disable debug server.") |
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.
With the default behavior changing I think the description here could be improved. Maybe referencing the config field that is being consumed now or something.
I am severely out of touch on the past several months of changes on relayer, so I am missing some context here. There are slightly different use cases for prometheus metrics and the /debug/pprof endpoint. But in general, I don't see an issue with them being served on the same port. In a maximally locked down environment, they could put a reverse proxy in front of the endpoint if they wanted to be 100% sure the metrics scraper couldn't access the pprof endpoint. |
APIListenPort was not being used. Now it will be the debug server address from the config unless a non-empty
--debug-addr
flag is set.