UNPKG

@zendesk/retrace

Version:

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

11 lines (9 loc) 396 B
import type { Span } from './spanTypes' import type { RecordedSpan } from './traceRecordingTypes' import type { RelationSchemasBase } from './types' /** used for calculating span occurrence number */ export const getSpanKey = < RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, >( span: Span<RelationSchemasT> | RecordedSpan<RelationSchemasT>, ) => `${span.type}|${span.name}`