You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command-line flags which require a file (e.g., -config=/root/config/prometheus.yml)
Inconsistent naming conventions:
PascalCase (e.g., ClickHouseUrl)
snake_case (e.g., SIGNOZ_LOCAL_DB_PATH)
Difficult to cleanup flags:
Once a command line flag is added, it is notoriously difficult to deprecate it.
And as if this mix of config formats (env vars, flags, files) wasn't enough, we've got os.Getenv() calls peppered throughout the codebase. Plus, good luck finding documentation about all the supported configurations!
We want to simplify configuration by removing these inconsistencies. This issue signals the direction for configuration management to ensure our users aren't surprised as we gradually move towards this.
The Direction
We will start supporting the following configuration formats with the ability to add more later:
YAML Configuration Files
Configurations will be provided via multiple YAML files using --config, for instance ./signoz --config base.yaml --config override.yaml
Files will be merged following a right-to-left precedence. In the above example, values in override.yaml will take precedence over base.yaml.
Environment Variables
All YAML configurations can be overridden (or specified) using environment variables.
All env variables will be prefixed with SIGNOZ_ to avoid collisions.
YAML paths will be converted to uppercase with underscores and prefixed with SIGNOZ_. For instance web.enabled: true will become SIGNOZ_WEB_ENABLED: true.
Underscores (_) in yaml path will translate to double underscores (__) in the environment. For instance sqlstore.max_open_conns: 10 will become SIGNOZ_SQLSTORE_MAX__OPEN__CONNS: 10
All existing command-line flags except --config will be deprecated.
Implementation
Work has already started in pkg/config and the rest of the modules need to start adopting this package.
The text was updated successfully, but these errors were encountered:
Background
Currently, SigNoz lacks a unified approach to configuration management, leading to several challenges:
SIGNOZ_LOCAL_DB_PATH
)-cluster
)-config=/root/config/prometheus.yml
)ClickHouseUrl
)SIGNOZ_LOCAL_DB_PATH
)And as if this mix of config formats (env vars, flags, files) wasn't enough, we've got
os.Getenv()
calls peppered throughout the codebase. Plus, good luck finding documentation about all the supported configurations!We want to simplify configuration by removing these inconsistencies. This issue signals the direction for configuration management to ensure our users aren't surprised as we gradually move towards this.
The Direction
We will start supporting the following configuration formats with the ability to add more later:
--config
, for instance./signoz --config base.yaml --config override.yaml
override.yaml
will take precedence overbase.yaml
.SIGNOZ_
to avoid collisions.SIGNOZ_
. For instanceweb.enabled: true
will becomeSIGNOZ_WEB_ENABLED: true
._
) in yaml path will translate to double underscores (__
) in the environment. For instancesqlstore.max_open_conns: 10
will becomeSIGNOZ_SQLSTORE_MAX__OPEN__CONNS: 10
--config
will be deprecated.Implementation
Work has already started in
pkg/config
and the rest of the modules need to start adopting this package.The text was updated successfully, but these errors were encountered: