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
NR-234856 Wrapped attribute key and value in double quotes #1827
NR-234856 Wrapped attribute key and value in double quotes #1827
Conversation
daf7728
to
966d6d5
Compare
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.
Hey @Sivakumar3695 , great work! I requested the inclusion of a couple of tests to check the YAML -> struct conversion. Great work so far!
"fb.input": "tail", | ||
"key1": "value1", | ||
"key2": "value2", | ||
"key3 with space": "value3 with space", |
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.
Doing a quick check, it seems that if you specify an attribute with spaces in its name, YAML actually accepts it:
I didn't expect that!
Could you please introduce a test here that checks the YAML -> struct conversion, both when having attribute names with whitespaces and attributes values with whitespaces?
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.
Hi @jsubirat, Nice suggestion.
A Test case has been added to check if attribute key and value with spaces are working. Thank you!
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.
Amazing thanks!
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.
Super nice and clean work @Sivakumar3695 , congrats! 🚀
"fb.input": "tail", | ||
"key1": "value1", | ||
"key2": "value2", | ||
"key3 with space": "value3 with space", |
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.
Amazing thanks!
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.
LGTM
Description:
For logging, to allow spaces between attribute key and value, the corresponding values are wrapped inside double quotes.
Testing screenshot: