Skip to content

Commit ba77ac1

Browse files
authored
fix(browser-starfish): ignore browser-extensions in resource module (#59141)
1 parent 7a5e476 commit ba77ac1

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

static/app/views/performance/browser/resources/utils/useResourceDomansQuery.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {useLocation} from 'sentry/utils/useLocation';
77
import useOrganization from 'sentry/utils/useOrganization';
88
import usePageFilters from 'sentry/utils/usePageFilters';
99
import {useResourceModuleFilters} from 'sentry/views/performance/browser/resources/utils/useResourceFilters';
10+
import {DEFAULT_RESOURCE_FILTERS} from 'sentry/views/performance/browser/resources/utils/useResourcesQuery';
1011
import {SpanMetricsField} from 'sentry/views/starfish/types';
1112

1213
const {SPAN_DOMAIN, SPAN_OP, TRANSACTION} = SpanMetricsField;
@@ -23,6 +24,7 @@ export const useResourceDomainsQuery = () => {
2324
const fields = [SPAN_DOMAIN, 'count()']; // count() is only here because an aggregation is required for the query to work
2425

2526
const queryConditions = [
27+
...DEFAULT_RESOURCE_FILTERS,
2628
`${SPAN_OP}:${resourceFilters[SPAN_OP] || '[resource.script,resource.css]'}`,
2729
`has:${SPAN_DOMAIN}`,
2830
...(resourceFilters[TRANSACTION]

static/app/views/performance/browser/resources/utils/useResourcePagesQuery.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {useLocation} from 'sentry/utils/useLocation';
55
import useOrganization from 'sentry/utils/useOrganization';
66
import usePageFilters from 'sentry/utils/usePageFilters';
77
import {useResourceModuleFilters} from 'sentry/views/performance/browser/resources/utils/useResourceFilters';
8+
import {DEFAULT_RESOURCE_FILTERS} from 'sentry/views/performance/browser/resources/utils/useResourcesQuery';
89
import {SpanMetricsField} from 'sentry/views/starfish/types';
910

1011
const {SPAN_DOMAIN, SPAN_OP} = SpanMetricsField;
@@ -22,6 +23,7 @@ export const useResourcePagesQuery = () => {
2223
const fields = ['transaction', 'count()']; // count() is only here because an aggregation is required for the query to work
2324

2425
const queryConditions = [
26+
...DEFAULT_RESOURCE_FILTERS,
2527
`${SPAN_OP}:${resourceFilters[SPAN_OP] || 'resource.*'}`,
2628
...(spanDomain ? [`${SPAN_DOMAIN}:${spanDomain}`] : []),
2729
]; // TODO: We will need to consider other ops

static/app/views/performance/browser/resources/utils/useResourcesQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type Props = {
2626
query?: string;
2727
};
2828

29+
export const DEFAULT_RESOURCE_FILTERS = ['!span.description:"browser-extension://*"'];
30+
2931
export const useResourcesQuery = ({sort, defaultResourceTypes, query, limit}: Props) => {
3032
const pageFilters = usePageFilters();
3133
const location = useLocation();
@@ -38,6 +40,7 @@ export const useResourcesQuery = ({sort, defaultResourceTypes, query, limit}: Pr
3840
}`,
3941
...(!query
4042
? [
43+
...DEFAULT_RESOURCE_FILTERS,
4144
...(resourceFilters.transaction
4245
? [`transaction:"${resourceFilters.transaction}"`]
4346
: []),

0 commit comments

Comments
 (0)