import type { AttributeValue } from '@opentelemetry/api'; import type { Headers as UndiciHeaders } from 'undici'; import type { Attributes, JaegerTraceInfo, JaegerTraceInfoLogField, JaegerTraceInfoSpan } from '../lib/index.js'; export declare function retrieveTraceInfoFromRemote(traceId: string, expectSpanNumber?: number): Promise<[JaegerTraceInfo]>; export declare function sortSpans(spans: JaegerTraceInfoSpan[]): JaegerTraceInfoSpan[]; type ExpectAttributes = Record; export interface AssertsRootOptions { /** * @default 'http' */ scheme?: 'http' | 'grpc'; path: string; span: JaegerTraceInfoSpan; traceId: string; operationName?: string; tags?: ExpectAttributes; logs?: (ExpectAttributes | false)[]; /** * @default true */ mergeDefaultTags?: boolean; /** * @default true */ mergeDefaultLogs?: boolean; } export declare function assertRootSpan(options: AssertsRootOptions): void; export interface AssertsOptions { traceId: string; operationName: string; tags?: ExpectAttributes; logs?: ExpectAttributes[]; } export declare function assertsSpan(span: JaegerTraceInfoSpan, options: AssertsOptions): void; export declare function assertJaegerTagItem(tag: Attributes, key: string, expectValue: AttributeValue | RegExp): void; export declare function assertJaegerLogField(field: JaegerTraceInfoLogField, key: string, expectValue: AttributeValue | RegExp): void; export interface Traceparent { version: string; traceId: string; parentId: string; traceFlags: string; } export declare function retrieveTraceparentFromHeader(headers: Headers | UndiciHeaders | Record): Traceparent | undefined; export interface AssertJaegerParentSpanRow { parentSpan: JaegerTraceInfoSpan; childSpan: JaegerTraceInfoSpan; } export declare function assertJaegerParentSpanArray(input: AssertJaegerParentSpanRow[]): void; export declare function assertJaegerParentSpan(parentSpan: JaegerTraceInfoSpan, childSpan: JaegerTraceInfoSpan): void; export {};