NH-40333 Adjust config-related logging #147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adjusts some config-related logging that was a little misleading.
Before:
If
SW_APM_CONFIG_FILE
is not set, the default is used (./solarwinds-apm-config.json
). A config file actually being there should be optional, but instead error logs every time:[ solarwinds_apm.apm_config ERROR p#1.139799927957312] Invalid config file path. Ignoring: [Errno 2] No such file or directory: './solarwinds-apm-config.json'
If no transaction filters are provided, including when if no config file is provided, then this is ok. But this message isn't great when that's the case:
[ solarwinds_apm.apm_config WARNING p#1.140511341504320] Transaction filters must be a non-empty list of filters. Ignoring.
After:
If
SW_APM_CONFIG_FILE
is not set and there is no file at the default./solarwinds-apm-config.json
, there is a debug message:[ solarwinds_apm.apm_config DEBUG p#1.140144370591552] No config file at ./solarwinds-apm-config.json; skipping
If no transaction filters are provided (no config file, or config file without KV for
transactionSettings
), there is a debug message:[ solarwinds_apm.apm_config DEBUG p#1.140327568500544] No transaction filters provided by config.
If a config file has
transactionSettings: []
,update_transaction_filters
does not log. At highest debug level, the ApmConfig init will log what the entire config is when complete.Please let me know if any questions/suggestions!