Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NH-40333 Adjust config-related logging #147

Merged
merged 3 commits into from
May 5, 2023

Conversation

tammy-baylis-swi
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi commented May 5, 2023

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!

@tammy-baylis-swi tammy-baylis-swi requested a review from a team May 5, 2023 00:23
Copy link
Member

@raphael-theriault-swi raphael-theriault-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me !

@tammy-baylis-swi tammy-baylis-swi merged commit 26ac8f8 into main May 5, 2023
@tammy-baylis-swi tammy-baylis-swi deleted the NH-40333-adjust-config-logging branch May 5, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants