UNPKG

@zendesk/retrace

Version:

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

12 lines (11 loc) 2.43 kB
import { type SpanMatch, type SpanMatcherFn, type SpanMatcherTags } from './matchSpan'; import type { LabelMatchingFnsRecord, LabelMatchingInputRecord, RelationSchemasBase } from './types'; import type { ArrayWithAtLeastOneElement } from './typeUtils'; export declare function applyDefaultTags<const SelectedRelationNameT extends keyof RelationSchemasT, const RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, const VariantsT extends string>(matcherFn: SpanMatcherFn<SelectedRelationNameT, RelationSchemasT, VariantsT>, defaultTags?: SpanMatcherTags): SpanMatcherFn<SelectedRelationNameT, RelationSchemasT, VariantsT>; export declare function ensureMatcherFn<const SelectedRelationNameT extends keyof RelationSchemasT, const RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, const VariantsT extends string, const MatcherInputT extends SpanMatch<SelectedRelationNameT, RelationSchemasT, VariantsT> = SpanMatch<SelectedRelationNameT, RelationSchemasT, VariantsT>>(matcherFnOrDefinition: MatcherInputT, defaultTags?: SpanMatcherTags): SpanMatcherFn<SelectedRelationNameT, RelationSchemasT, VariantsT>; export declare function convertMatchersToFns<const SelectedRelationNameT extends keyof RelationSchemasT, const RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, const VariantsT extends string>(matchers: readonly SpanMatch<SelectedRelationNameT, RelationSchemasT, VariantsT>[] | undefined): ArrayWithAtLeastOneElement<SpanMatcherFn<SelectedRelationNameT, RelationSchemasT, VariantsT>> | undefined; export declare function convertLabelMatchersToFns<const SelectedRelationNameT extends keyof RelationSchemasT, const RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, const VariantsT extends string>(definitionLabelMatchers: LabelMatchingInputRecord<SelectedRelationNameT, RelationSchemasT, VariantsT>): LabelMatchingFnsRecord<SelectedRelationNameT, RelationSchemasT, VariantsT>; /** * Helper function to ensure that the matcher is a function or a special token */ export declare function ensureMatcherFnOrSpecialToken<SelectedRelationNameT extends keyof RelationSchemasT, RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, VariantsT extends string, SpecialToken extends string>(spanMatcher: SpanMatch<SelectedRelationNameT, RelationSchemasT, VariantsT> | SpecialToken): SpanMatcherFn<SelectedRelationNameT, RelationSchemasT, VariantsT> | SpecialToken | undefined;