traceMissingInstrumentationRow.tsx 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import {t} from 'sentry/locale';
  2. import {TraceIcons} from '../traceIcons';
  3. import type {TraceTree} from '../traceModels/traceTree';
  4. import type {TraceTreeNode} from '../traceModels/traceTreeNode';
  5. import {
  6. makeTraceNodeBarColor,
  7. MissingInstrumentationTraceBar,
  8. } from '../traceRow/traceBar';
  9. import {
  10. maybeFocusTraceRow,
  11. TraceRowConnectors,
  12. type TraceRowProps,
  13. } from '../traceRow/traceRow';
  14. export function TraceMissingInstrumentationRow(
  15. props: TraceRowProps<TraceTreeNode<TraceTree.MissingInstrumentationSpan>>
  16. ) {
  17. return (
  18. <div
  19. key={props.index}
  20. ref={r =>
  21. props.tabIndex === 0 && !props.isEmbedded
  22. ? maybeFocusTraceRow(r, props.node, props.previouslyFocusedNodeRef)
  23. : null
  24. }
  25. tabIndex={props.tabIndex}
  26. className={`TraceRow ${props.rowSearchClassName}`}
  27. onClick={props.onRowClick}
  28. onKeyDown={props.onRowKeyDown}
  29. style={props.style}
  30. >
  31. <div
  32. className="TraceLeftColumn"
  33. ref={props.registerListColumnRef}
  34. onDoubleClick={props.onRowDoubleClick}
  35. >
  36. <div className="TraceLeftColumnInner" style={props.listColumnStyle}>
  37. <div className="TraceChildrenCountWrapper">
  38. <TraceRowConnectors node={props.node} manager={props.manager} />
  39. </div>
  40. <span className="TraceOperation">{t('Missing instrumentation')}</span>
  41. </div>
  42. </div>
  43. <div
  44. ref={props.registerSpanColumnRef}
  45. className={props.spanColumnClassName}
  46. onDoubleClick={props.onRowDoubleClick}
  47. >
  48. <MissingInstrumentationTraceBar
  49. virtualized_index={props.virtualized_index}
  50. manager={props.manager}
  51. color={makeTraceNodeBarColor(props.theme, props.node)}
  52. node_space={props.node.space}
  53. />
  54. <button
  55. ref={props.registerSpanArrowRef}
  56. className="TraceArrow"
  57. onClick={props.onSpanArrowClick}
  58. >
  59. <TraceIcons.Chevron direction="left" />
  60. </button>
  61. </div>
  62. </div>
  63. );
  64. }