import {createRef, PureComponent} from 'react'; import {Observer} from 'mobx-react'; import EmptyStateWarning from 'sentry/components/emptyStateWarning'; import {t} from 'sentry/locale'; import {Organization} from 'sentry/types'; import {CustomerProfiler} from 'sentry/utils/performanceForSentry'; import * as CursorGuideHandler from './cursorGuideHandler'; import * as DividerHandlerManager from './dividerHandlerManager'; import DragManager, {DragManagerChildrenProps} from './dragManager'; import TraceViewHeader from './header'; import * as ScrollbarManager from './scrollbarManager'; import SpanTree from './spanTree'; import {getTraceContext} from './utils'; import WaterfallModel from './waterfallModel'; type Props = { organization: Organization; waterfallModel: WaterfallModel; }; class TraceView extends PureComponent { traceViewRef = createRef(); virtualScrollBarContainerRef = createRef(); minimapInteractiveRef = createRef(); renderHeader = (dragProps: DragManagerChildrenProps) => ( {() => { const {waterfallModel} = this.props; return ( ); }} ); render() { const {organization, waterfallModel} = this.props; if (!getTraceContext(waterfallModel.event)) { return (

{t('There is no trace for this transaction')}

); } return ( {(dragProps: DragManagerChildrenProps) => ( {() => { const parsedTrace = waterfallModel.parsedTrace; return ( {dividerHandlerChildrenProps => { return ( {this.renderHeader(dragProps)} {() => { return ( ); }} ); }} ); }} )} ); } } export default TraceView;