Closed logyball closed 7 months ago
I'm gonna pass on the os.exit()
suggestion for now - this seems like a nice-to-have that we won't need and adds a little bit of clutter. I think it'd be surprising if we used different exit codes for something meaningful, and we can re-evaluate when changing the log
-> slog
if we feel strongly.
Closes #19
Adding a graceful shutdown to the exporter, complete with a timeout for the server. Additionally, added some minor refactors throughout the
exporter.go
file to make the code slightly more readable.Shutdown Changes
http.Server{}
structRefactors
ProviderFlags()
operationalFlags()
Moved some functionality toinit()
andcreatePromRegistryHandler()
helper functions