-
Notifications
You must be signed in to change notification settings - Fork 483
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
Render HTTP header tags as comma-separated strings #1295
Render HTTP header tags as comma-separated strings #1295
Conversation
Signed-off-by: Will Rogers <wjrogers@gmail.com>
3f848da
to
466a41c
Compare
expect(valueDiv.html()).toMatch(data[i].expected); | ||
} | ||
}); | ||
}); | ||
|
||
it('renders HTTP headers as multiple string spans', () => { |
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 test feels very complicated & hard to maintain. Could we not use the .expected
field above to define the exact output we want for the two new test cases?
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.
Sure. I was figuring out how the tests work and maybe got carried away. Will change it.
Signed-off-by: Will Rogers <wjrogers@gmail.com>
Signed-off-by: Will Rogers <wjrogers@gmail.com>
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.
👍
please run the linter, |
Signed-off-by: Will Rogers <wjrogers@gmail.com>
Head branch was pushed to by a user without write access
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1295 +/- ##
==========================================
+ Coverage 95.38% 95.54% +0.16%
==========================================
Files 244 244
Lines 7641 7651 +10
Branches 2003 2006 +3
==========================================
+ Hits 7288 7310 +22
+ Misses 353 341 -12
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
## Which problem is this PR solving? Resolves jaegertracing#1294 ## Short description of the changes Change `formatValue` to check whether the (de-serialized) value is an array and, if so, whether the key should be rendered as a comma-separated list of strings. When both conditions are true, render the value like so: ```html <div class="json-markup"> <span class="json-markup-string">value1</span>, <span class="json-markup-string">value2</span> </div> ``` ![image](https://user-images.githubusercontent.com/62573/227103539-aeaf81cd-d5e3-4d4e-a878-f4f68a1503e8.png) Currently, tag keys starting with `http.request.header.` and `http.response.header.` render as string lists. Please let me know if there are any other attributes I should include. --------- Signed-off-by: Will Rogers <wjrogers@gmail.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Which problem is this PR solving?
Resolves #1294
Short description of the changes
Change
formatValue
to check whether the (de-serialized) value is an array and, if so, whether the key should be rendered as a comma-separated list of strings. When both conditions are true, render the value like so:Currently, tag keys starting with
http.request.header.
andhttp.response.header.
render as string lists. Please let me know if there are any other attributes I should include.