@zendesk/retrace
Version:
define and capture Product Operation Traces along with computed metrics with an optional friendly React beacon API
25 lines (24 loc) • 1.1 kB
TypeScript
import type { IGardenTheme } from '@zendeskgarden/react-theming';
import type { SpanAnnotation } from '../v3/spanAnnotationTypes';
import type { Attributes, Span, SpanBase } from '../v3/spanTypes';
import type { TraceRecording } from '../v3/traceRecordingTypes';
import type { Timestamp } from '../v3/types';
import type { SupportedSpanTypes } from './constants';
type DistributiveOmit<T, K extends keyof any> = T extends T ? Omit<T, K> : never;
export type MinimalSpanAnnotation = Omit<SpanAnnotation, 'id' | 'occurrence' | 'recordedInState' | 'labels'> & Partial<SpanAnnotation>;
export type MinimalSpan = DistributiveOmit<Span<any> | SpanBase<any>, 'startTime' | 'attributes'> & {
startTime: Pick<Timestamp, 'now'> & Partial<Timestamp>;
attributes?: Attributes;
};
export interface MappedSpanAndAnnotation {
span: MinimalSpan;
annotation: MinimalSpanAnnotation;
groupName: string;
type: SupportedSpanTypes;
}
export type RecordingInputFile = TraceRecording<any, any>;
declare module 'styled-components' {
interface DefaultTheme extends IGardenTheme {
}
}
export {};