-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
feat(insights): implement geo region selector in web vitals and assets #76185
Conversation
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.
looks good, would suggest a custom decoder for the regions
static/app/views/insights/browser/resources/components/resourceView.tsx
Outdated
Show resolved
Hide resolved
@@ -67,6 +71,9 @@ export function PagePerformanceTable() { | |||
|
|||
const query = decodeScalar(location.query.query, ''); | |||
const browserTypes = decodeBrowserTypes(location.query[SpanIndexedField.BROWSER_NAME]); | |||
const subregions = decodeList( |
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 it would make sense to use a custom query decoder for all of these places we're decoding the subregions -- similar to decodeBrowserTypes
-- so that we can guarantee the regions are valid
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.
Hmm, When would this occur?
I suppose we can just be safe here, and cover the manual case.
although the query would still succeed. (Would just look for a region that doesn't exist)
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'm going to address this in another PR, i'm still not 100% sure on the benefit so i'll give it some thought, there are 2 cases I can see that would produce an invalid regions.
- Our code somehow produces an invalid subregion. In this case, i feel as though adding decodeSubregion might actually mask any problem we have in code that shouldn't be occurring anyways. I think we would want to see if this problem occurs.
- The user manually enters a subregion in the url bar. In this case the query should succeed here anyways, unless they enter a string that happens to match some other query syntax. Which in that case i think it might be better to show a failed query in our UI, so that the user knows what they entered in the url bar doesn't make sense. Either way I like the idea of showing the user the results of their own changes in the url bar.
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.
Tiny, judgment call nit aside (and Kevin's notes above), LGTM!
Work toward #75230
Adds geo selector in the web vitals and resource module and ensure all queries gets the filter applied
NOTE: not all the metrics are properly tagged yet, so web vitals doesn't work entierely yet, and the resource module doesn't have geo data for resource size metrics. Its all behind a feature flag, so this not an issue that customers can see.