Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Azure] Sanitize message in case of malformed json #34874
[Azure] Sanitize message in case of malformed json #34874
Changes from 16 commits
bd610ec
c97794c
5c918de
1e4b628
3e41c8a
9e5a20c
18dd2b9
3aed9d0
b8fa4ab
ae71f6d
e44281e
e8fa2c4
e70593a
ef85a1b
7b01039
a10ad1e
df08c30
e4e4df2
67fcc55
cbe18cf
967d985
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This algorithm based on double-quotes detection may not only work in all cases.
For example, there are log categories where string values contain an embedded JSON, for example:
https://github.com/elastic/integrations/blob/6ede14e475050d34e62b1b83ad839f688d80c902/packages/azure/data_stream/activitylogs/_dev/test/pipeline/test-activitylogs-edgecases.log#L2-L3
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.
Good catch, I see Azure is very creative in their JSON output:
Treating JSON embedded within strings as simple strings keeps the logic fairly clean while addressing this.
Escaped double quotes are no longer toggling
inDoubleQuotes
.