One (of the many) issues with how we pass in arguments and settings to the exporter using the command line is that secrets such as the MaxMind API key and password are stored in history - and that's never a good thing.
For v0.3.0, we should move all config and settings to a file in .solana-exporter. This will also make it easier to implement #10.
[x] Determine a good config file format
[x] Move all current clap arguments into a config file
[x] Add arguments for overriding persistent DB and config file location
[x] Add a command to generate a template config file
Some thoughts: command line arguments should be for options that the user expects to change every time the program is run. Config files should be for everything else. As of v0.2.0 - the RPC address, Prometheus target, and API keys are either secrets (explained above), or infrequently changed. Also, overrides are a great use of CLI arguments!
One (of the many) issues with how we pass in arguments and settings to the exporter using the command line is that secrets such as the MaxMind API key and password are stored in history - and that's never a good thing.
For v0.3.0, we should move all config and settings to a file in
.solana-exporter
. This will also make it easier to implement #10.Some thoughts: command line arguments should be for options that the user expects to change every time the program is run. Config files should be for everything else. As of
v0.2.0
- the RPC address, Prometheus target, and API keys are either secrets (explained above), or infrequently changed. Also, overrides are a great use of CLI arguments!