UNPKG

@zendesk/retrace

Version:

define and capture Product Operation Traces along with computed metrics with an optional friendly React beacon API

15 lines (14 loc) 583 B
import type { HierarchicalSpanAndAnnotation } from '../types'; interface UseSpanExpansionOptions { initialExpandedSpans?: Set<string>; persistKey?: string; } export declare function useSpanExpansion(options?: UseSpanExpansionOptions): { expandedSpans: Set<string>; toggleSpanExpansion: (spanId: string) => void; isSpanExpanded: (spanId: string) => boolean; collapseAll: () => void; expandAll: (spans: HierarchicalSpanAndAnnotation[]) => void; getVisibleSpans: (spans: HierarchicalSpanAndAnnotation[]) => HierarchicalSpanAndAnnotation[]; }; export {};