Skip to content

Commit 89bc9d7

Browse files
authored
Correct processing of deprecated ignore_errors setting (#226)
* Correct processing of deprecated ignore_errors * Fix broken settings test
1 parent 615d9dc commit 89bc9d7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

newrelic/config.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ def _process_configuration(section):
398398
section, "error_collector.max_event_samples_stored", "getint", None
399399
)
400400
_process_setting(section, "error_collector.capture_source", "getboolean", None)
401+
_process_setting(
402+
section, "error_collector.ignore_errors", "get", _map_split_strings
403+
)
401404
_process_setting(
402405
section, "error_collector.ignore_classes", "get", _map_split_strings
403406
)
@@ -1873,6 +1876,13 @@ def _process_error_trace_configuration():
18731876
if _config_object.has_option(section, "ignore_classes"):
18741877
ignore_classes = _config_object.get(section, "ignore_classes").split()
18751878

1879+
if _config_object.has_option(section, "ignore_errors"):
1880+
if _config_object.has_option(section, "ignore_classes"):
1881+
_logger.info("Ignoring deprecated setting: ignore_errors. Please use new setting: ignore_classes.")
1882+
else:
1883+
_logger.info("Deprecated setting found: ignore_errors. Please use new setting: ignore_classes.")
1884+
ignore_classes = _config_object.get(section, "ignore_errors").split()
1885+
18761886
if _config_object.has_option(section, "expected_classes"):
18771887
expected_classes = _config_object.get(section, "expected_classes").split()
18781888

0 commit comments

Comments
 (0)