missingInstrumentationNode.tsx 835 B

1234567891011121314151617181920212223242526
  1. import type {TraceTree} from './traceTree';
  2. import {TraceTreeNode} from './traceTreeNode';
  3. export class MissingInstrumentationNode extends TraceTreeNode<TraceTree.MissingInstrumentationSpan> {
  4. next: TraceTreeNode<TraceTree.Span>;
  5. previous: TraceTreeNode<TraceTree.Span>;
  6. constructor(
  7. parent: TraceTreeNode<TraceTree.NodeValue>,
  8. node: TraceTree.MissingInstrumentationSpan,
  9. metadata: TraceTree.Metadata,
  10. previous: TraceTreeNode<TraceTree.Span>,
  11. next: TraceTreeNode<TraceTree.Span>
  12. ) {
  13. super(parent, node, metadata);
  14. this.next = next;
  15. this.previous = previous;
  16. // The space of a missing instrumentation node is gap between previous end and next start
  17. this.space = [
  18. previous.value.timestamp * 1e3,
  19. (next.value.start_timestamp - previous.value.timestamp) * 1e3,
  20. ];
  21. }
  22. }