-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Add User agent to trace summary #47526
Conversation
💚 Build Succeeded |
type UserAgentSummaryItemProps = UserAgent; | ||
|
||
const Version = styled('span')` | ||
color: ${theme.textColors.subdued}; |
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 think we can remove the subdued text here and make it consistent with how we display the trace % in the other part of the summary.
return ( | ||
<EuiToolTip | ||
content={i18n.translate('xpack.apm.transactionDetails.userAgentLabel', { | ||
defaultMessage: 'User agent' |
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.
Perhaps just "User agent & version" as the default message as that's what is expected to display.
💔 Build Failed |
@elasticmachine test this please |
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 🎉
💚 Build Succeeded |
It might very well be different in the wild but in our test data 85% of all user agent labels are "Other": [
{ "key": "Other", "doc_count": 10114314 },
{ "key": "Python Requests", "doc_count": 611706 },
{ "key": "curl", "doc_count": 561747 },
{ "key": "Java", "doc_count": 550257 },
{ "key": "HeadlessChrome", "doc_count": 17 }
] Should we perhaps omit the user agent if it's "Other" (I expect the agents set it to other by default)? |
💚 Build Succeeded |
Sure, I think it's reasonable to then omit when there's really nothing important to display in the summary. The actual information can still be found in metadata. |
Exactly my thinking. Only makes sense to surface this to the user if it's actually useful.. |
@sqren @formgeist I'm not sure about hiding other. I grabbed a random transaction and saw this: {
"original": "Python/3.7 aiohttp/3.3.2",
"name": "Other",
"device": {
"name": "Other"
}
} So perhaps we should keep other and put the original (which could be quite long) in the tooltip. Or maybe we could have the user agent link to the section in the metadata tab. Not sure about how to do it correctly, but I'm certain, that "Other" does not mean "No user agent reported." |
As I understood it, the initial approach was to display short, whitelisted name like "Firefox" (instead of "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.2.8) Gecko/20101230 Firefox/3.6.8"), "Chrome", "Safari" etc. And then in the tooltip show a slightly longer format including version. If we couldn't match the user agent we would show "Other" and in the tooltip the original. |
So if it's not "Other" what do we show in the tooltip? Right now it shows "User agent and version" no matter what. |
I think we should display |
We can leave it as-is for now. My main gripe with this is that despite our efforts to trim down and simplify the trace summary it's very easy to add "just another field". All the information is already available below in the metadata tab, so the fields we choose to highlight should be deliberately picked, and we should have a good story for what exactly the user wants to see. Maybe we have that here and I just misunderstood the use cases. |
Fixes #47526