Skip to content

Commit 71f3bfa

Browse files
authored
feat(trace-details): Remove internal attribute filtering (#97416)
We do a bit of jank to hide `__sentry_internal` attributes, but instead we're going to rely on a more robust backend approach, added in #97414 which hides `__sentry_internal`, `sentry._internal.`, and `sentry._meta.` attributes.
1 parent e10bb17 commit 71f3bfa

File tree

1 file changed

+2
-18
lines changed
  • static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections

1 file changed

+2
-18
lines changed

static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/attributes.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {FieldKey} from 'sentry/utils/fields';
1616
import {generateProfileFlamechartRoute} from 'sentry/utils/profiling/routes';
1717
import {ellipsize} from 'sentry/utils/string/ellipsize';
1818
import {looksLikeAJSONArray} from 'sentry/utils/string/looksLikeAJSONArray';
19-
import {useIsSentryEmployee} from 'sentry/utils/useIsSentryEmployee';
2019
import type {AttributesFieldRendererProps} from 'sentry/views/explore/components/traceItemAttributes/attributesTree';
2120
import {AttributesTree} from 'sentry/views/explore/components/traceItemAttributes/attributesTree';
2221
import type {TraceItemResponseAttribute} from 'sentry/views/explore/hooks/useTraceItemDetails';
@@ -95,7 +94,6 @@ export function Attributes({
9594
}) {
9695
const [searchQuery, setSearchQuery] = useState('');
9796
const traceState = useTraceState();
98-
const isSentryEmployee = useIsSentryEmployee();
9997
const shouldUseOTelFriendlyUI = useOTelFriendlyUI();
10098
const columnCount =
10199
traceState.preferences.layout === 'drawer left' ||
@@ -110,21 +108,7 @@ export function Attributes({
110108
attribute => !HIDDEN_ATTRIBUTES.includes(attribute.name)
111109
);
112110

113-
// `sentry._internal` attributes are used to track internal system behavior (e.g., the span buffer outcomes). Only show these to Sentry staff.
114-
const onlyAllowedAttributes = onlyVisibleAttributes.filter(attribute => {
115-
if (
116-
(attribute.name.startsWith('sentry._internal') ||
117-
attribute.name.startsWith('sentry._meta') ||
118-
attribute.name.startsWith('__sentry_internal')) &&
119-
!isSentryEmployee
120-
) {
121-
return false;
122-
}
123-
124-
return true;
125-
});
126-
127-
const filteredByOTelMode = onlyAllowedAttributes.filter(attribute => {
111+
const filteredByOTelMode = onlyVisibleAttributes.filter(attribute => {
128112
if (shouldUseOTelFriendlyUI) {
129113
return !['span.description', 'span.op'].includes(attribute.name);
130114
}
@@ -143,7 +127,7 @@ export function Attributes({
143127
});
144128

145129
return onlyMatchingAttributes;
146-
}, [attributes, searchQuery, isSentryEmployee, shouldUseOTelFriendlyUI]);
130+
}, [attributes, searchQuery, shouldUseOTelFriendlyUI]);
147131

148132
const customRenderers: Record<
149133
string,

0 commit comments

Comments
 (0)