Closed cyrus-mc closed 4 years ago
Fix for #89
@cyrus-mc Please squash your commits and ensure it is signed.
@cyrus-mc
I did not consider this. My bad. Perhaps loadConfig
should be moved to an init
func in main.go
? I made a poor assumption around how viper and init is usually done which lead to this oversight. Perhaps we avoid future issues by loading the config at the very very beginning of execution
ping @cyrus-mc ; please sign your commit, I really need to get this fix in for a release to be cut.
Trivial sized PR with clear resolution; I just fixed it separately on my own branch and pushed a PR here: https://github.com/heptiolabs/eventrouter/pull/98
Thanks for finding this issue though @cyrus-mc ; sorry for moving ahead with the fix but I wanted to unblock things for a release.
A flag was added to enable/disable prometheus events. The logic for this was in the init function within eventrouter.go. With the way loadConfig is currently written the init function fires first, meaning the configuration isn't processed thus prometheus is always disabled.