Skip to content

Commit

Permalink
Update sanitize_options option deprecation notice
Browse files Browse the repository at this point in the history
Give a specific version when we remove the sanitize_options
configuration option.
  • Loading branch information
zmoog committed Sep 16, 2024
1 parent 91f3deb commit 244092d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions x-pack/filebeat/input/azureeventhub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Users can use the `sanitizers` configuration option to set up the input sanitiza
input detects invalid JSON, the input will try to fix or remove it from the log.

Existing sanitizers:

- `new_lines`: removes new lines inside JSON strings.
- `single_quotes`: replaces single quotes with double quotes in JSON strings.
- `replace_all`: replaces all occurrences of a substring matching a regex pattern with a fixed literal string.
Expand Down Expand Up @@ -68,7 +69,6 @@ GitHub issue:

- https://github.com/elastic/beats/issues/34092


#### double_quotes

Here is an example of the `sanitizers` configuration option with the `double_quotes` sanitizer:
Expand Down Expand Up @@ -115,8 +115,6 @@ the following GitHub issue:

- https://github.com/elastic/azuremarketplacedev/issues/190



#### replace_all

Here is an example of the `sanitizers` configuration option with the `replace_all` sanitizer:
Expand Down
4 changes: 2 additions & 2 deletions x-pack/filebeat/input/azureeventhub/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type azureInputConfig struct {
// - type: single_quotes
//
// The `sanitize_options` option is deprecated and will be
// removed in future releases.
// removed in 9.0 release.
//
// Default is an empty list (no sanitization).
LegacySanitizeOptions []string `config:"sanitize_options"`
Expand Down Expand Up @@ -150,7 +150,7 @@ func (conf *azureInputConfig) Validate() error {

// log a warning for each sanitization option not supported
for _, opt := range conf.LegacySanitizeOptions {
logger.Warnw("legacy sanitization `sanitize_options` options are deprecated and will be removed in future releases; use the `sanitizers` option instead", "option", opt)
logger.Warnw("legacy sanitization `sanitize_options` options are deprecated and will be removed in the 9.0 release; use the `sanitizers` option instead", "option", opt)
err := sanitizeOptionsValidate(opt)
if err != nil {
logger.Warnf("%s: %v", opt, err)
Expand Down
3 changes: 2 additions & 1 deletion x-pack/filebeat/input/azureeventhub/sanitizers_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import "errors"
// - NEW_LINES: replaces new lines with spaces
// - SINGLE_QUOTES: replaces single quotes with double quotes
//
// The legacy `sanitize_options` is deprecated and will be removed in the future.
// The legacy `sanitize_options` is deprecated and will be removed in the
// 9.0 release.
// Users should use the `sanitizers` configuration option instead.
//
// However, the current sanitization implementation honors the legacy sanitization
Expand Down

0 comments on commit 244092d

Please sign in to comment.