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
Preserve JSON types in flatten_json function #13947
Conversation
9857c9c
to
6317c1f
Compare
# Entry type according to https://keepachangelog.com/en/1.0.0/ | ||
# One of: a(dded), c(hanged), d(eprecated), r(emoved), f(ixed), s(ecurity) | ||
type = "fixed" | ||
message = "Pipeline function flatten_json respects the original JSON types. An optional parameter is provided for back-compat." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
message = "Pipeline function flatten_json respects the original JSON types. An optional parameter is provided for back-compat." | |
message = "The pipeline function flatten_json now respects the original JSON types. An optional parameter is provided for backwards compatibility" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should note that also in UPGRADING.md
because it's a breaking change.
I do agree that we should change the default though, it's better to do it now, rather than to have the wrong default forever in our product.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickmann did you see my note about UPGRADING.md
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed that - fixed it
...og2-server/src/main/java/org/graylog/plugins/pipelineprocessor/functions/json/JsonUtils.java
Outdated
Show resolved
Hide resolved
...og2-server/src/main/java/org/graylog/plugins/pipelineprocessor/functions/json/JsonUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline
UPGRADING.md
Outdated
@@ -43,6 +43,11 @@ It is now possible to change this behavior. When configuration property `stream_ | |||
If all of your streams go to dedicated, separate index sets, it is advised to keep the default value of `stream_aware_field_types` property (`false`). It will decrease the load on ES/OS and stream separation across index sets already helps with showing proper fields for a query. | |||
On the other hand, if multiple streams go to the same index sets, and you want precise field types and suggestions, you should set it to `true`. Consider monitoring your ES/OS load after that change, especially when using huge numbers of fields and streams. | |||
|
|||
## Breaking changes to pipeline functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a Breaking changes section in line 8
If I was to skim that document, I might have missed it down here.
* preserve JSON types when flattening * cl * add stringify optional param * make stringify parameter optional * update cl * incorporate review feedback * add to upgrading.md * put upgrade message in proper section * minor wording change
Fixes #13888
Pipeline function
flatten_json
returns all of the extracted values as strings, regardless of original JSON type.We now honor the type.
See the associated issue for details and examples.