import {useMemo} from 'react'; import {EventContexts} from 'sentry/components/events/contexts'; import {SpanProfileDetails} from 'sentry/components/events/interfaces/spans/spanProfileDetails'; import {getSpanOperation} from 'sentry/components/events/interfaces/spans/utils'; import ProjectBadge from 'sentry/components/idBadge/projectBadge'; import {CustomMetricsEventData} from 'sentry/components/metrics/customMetricsEventData'; import {Tooltip} from 'sentry/components/tooltip'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import {useLocation} from 'sentry/utils/useLocation'; import useProjects from 'sentry/utils/useProjects'; import type {TraceTreeNodeDetailsProps} from 'sentry/views/performance/newTraceDetails/traceDrawer/tabs/traceTreeNodeDetails'; import type { TraceTree, TraceTreeNode, } from 'sentry/views/performance/newTraceDetails/traceModels/traceTree'; import {ProfileGroupProvider} from 'sentry/views/profiling/profileGroupProvider'; import {ProfileContext, ProfilesProvider} from 'sentry/views/profiling/profilesProvider'; import {TraceDrawerComponents} from '.././styles'; import {IssueList} from '../issues/issues'; import Alerts from './sections/alerts'; import {SpanDescription} from './sections/description'; import {GeneralInfo} from './sections/generalInfo'; import {SpanHTTPInfo} from './sections/http'; import {SpanKeys} from './sections/keys'; import {Tags} from './sections/tags'; function SpanNodeDetailHeader({ node, organization, onTabScrollToNode, project, }: { node: TraceTreeNode; onTabScrollToNode: (node: TraceTreeNode) => void; organization: Organization; project: Project | undefined; }) { const span = node.value; return (
{t('span')}
); } export function SpanNodeDetails({ node, organization, onTabScrollToNode, onParentClick, }: TraceTreeNodeDetailsProps>) { const location = useLocation(); const {projects} = useProjects(); const issues = useMemo(() => { return [...node.errors, ...node.performance_issues]; }, [node.errors, node.performance_issues]); const project = projects.find(proj => proj.slug === node.value.event?.projectSlug); const profileId = node.value.event?.contexts?.profile?.profile_id ?? null; return ( {node.value.event.projectSlug ? ( {profiles => ( {issues.length > 0 ? ( ) : null} {organization.features.includes('profiling') ? ( ) : null} )} ) : null} ); }