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-29380 Remove unused enable_sanitize_sql config #164

Merged
merged 7 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add log warning when `set_transaction_name` with empty name ([#162](https://github.com/solarwindscloud/solarwinds-apm-python/pull/162))


- Removed unused enable_sanitize_sql config storage ([#164](https://github.com/solarwindscloud/solarwinds-apm-python/pull/164))

## [0.12.0](https://github.com/solarwindscloud/solarwinds-apm-python/releases/tag/rel-0.12.0) - 2023-06-01
### Changed
- Bugfix: APM tracing disabled when platform not supported ([#153](https://github.com/solarwindscloud/solarwinds-apm-python/pull/153))
Expand Down
3 changes: 0 additions & 3 deletions solarwinds_apm/apm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def __init__(
"bufsize": -1,
"histogram_precision": -1,
"reporter_file_single": 0,
"enable_sanitize_sql": True,
"log_trace_id": "never",
"proxy": "",
"is_grpc_clean_hack_enabled": False,
Expand Down Expand Up @@ -451,8 +450,6 @@ def __setitem__(self, key: str, value: str) -> None:
elif key == "log_trace_id":
self._set_config_value(key, value)

elif key in {"enable_sanitize_sql", "warn_deprecated"}:
self._set_config_value(key, value)
else:
logger.warning(
"Unsupported SolarWinds APM config key: %s",
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_apm_config/fixtures/cnf_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def fixture_cnf_dict():
"bufsize": 2,
"histogramPrecision": 2,
"reporterFileSingle": 2,
"enableSanitizeSql": True,
"logTraceId": "always",
"proxy": "http://foo-bar",
"isGrpcCleanHackEnabled": True,
Expand Down Expand Up @@ -54,7 +53,6 @@ def fixture_cnf_dict_enabled_false():
"bufsize": 2,
"histogramPrecision": 2,
"reporterFileSingle": 2,
"enableSanitizeSql": True,
"logTraceId": "always",
"proxy": "http://foo-bar",
"isGrpcCleanHackEnabled": True,
Expand Down
7 changes: 0 additions & 7 deletions tests/unit/test_apm_config/test_apm_config_cnf_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def test_update_with_cnf_file_all_valid(
assert resulting_config.get("bufsize") == 2
assert resulting_config.get("histogram_precision") == 2
assert resulting_config.get("reporter_file_single") == 2
assert resulting_config.get("enable_sanitize_sql") == True
assert resulting_config.get("log_trace_id") == "always"
assert resulting_config.get("proxy") == "http://foo-bar"
assert resulting_config.get("is_grpc_clean_hack_enabled") == True
Expand Down Expand Up @@ -178,7 +177,6 @@ def test_update_with_cnf_file_mostly_invalid(
"bufsize": "foo",
"histogramPrecision": "foo",
"reporterFileSingle": "foo",
"enableSanitizeSql": "foo",
"log_trace_id": "not-never-always-etc",
"proxy": "foo",
"isGrpcCleanHackEnabled": "foo",
Expand Down Expand Up @@ -211,7 +209,6 @@ def test_update_with_cnf_file_mostly_invalid(
assert resulting_config.get("bufsize") == -1
assert resulting_config.get("histogram_precision") == -1
assert resulting_config.get("reporter_file_single") == 0
assert resulting_config.get("enable_sanitize_sql") == True
assert resulting_config.get("log_trace_id") == "never"
assert resulting_config.get("proxy") == ""
assert resulting_config.get("is_grpc_clean_hack_enabled") == False
Expand Down Expand Up @@ -260,7 +257,6 @@ def test_update_with_cnf_file_and_all_validenv_vars(
"SW_APM_BUFSIZE": "3",
"SW_APM_HISTOGRAM_PRECISION": "3",
"SW_APM_REPORTER_FILE_SINGLE": "3",
"SW_APM_ENABLE_SANITIZE_SQL": "false",
"SW_APM_LOG_TRACE_ID": "never",
"SW_APM_PROXY": "http://other-foo-bar",
"SW_APM_IS_GRPC_CLEAN_HACK_ENABLED": "false",
Expand Down Expand Up @@ -302,7 +298,6 @@ def test_update_with_cnf_file_and_all_validenv_vars(
assert resulting_config.get("bufsize") == 3
assert resulting_config.get("histogram_precision") == 3
assert resulting_config.get("reporter_file_single") == 3
assert resulting_config.get("enable_sanitize_sql") == False
assert resulting_config.get("log_trace_id") == "never"
assert resulting_config.get("proxy") == "http://other-foo-bar"
assert resulting_config.get("is_grpc_clean_hack_enabled") == False
Expand Down Expand Up @@ -344,7 +339,6 @@ def test_update_with_cnf_file_and_several_invalid_env_vars(
"SW_APM_BUFSIZE": "other-foo-bar",
"SW_APM_HISTOGRAM_PRECISION": "other-foo-bar",
"SW_APM_REPORTER_FILE_SINGLE": "other-foo-bar",
"SW_APM_ENABLE_SANITIZE_SQL": "other-foo-bar",
"SW_APM_LOG_TRACE_ID": "other-foo-bar",
"SW_APM_PROXY": "other-foo-bar",
"SW_APM_IS_GRPC_CLEAN_HACK_ENABLED": "other-foo-bar",
Expand Down Expand Up @@ -383,7 +377,6 @@ def test_update_with_cnf_file_and_several_invalid_env_vars(
assert resulting_config.get("bufsize") == 2
assert resulting_config.get("histogram_precision") == 2
assert resulting_config.get("reporter_file_single") == 2
assert resulting_config.get("enable_sanitize_sql") == True
assert resulting_config.get("log_trace_id") == "always"
assert resulting_config.get("proxy") == "http://foo-bar"
assert resulting_config.get("is_grpc_clean_hack_enabled") == True
Expand Down