/** * Functions for constructing OpenTelemetry spans from workflow entities */ import type { Event, WorkflowRun } from '@workflow/world'; import type { Span, SpanEvent } from '../trace-viewer/types'; export declare const WORKFLOW_LIBRARY: { name: string; version: string; }; /** * Convert workflow events to span events * Only includes events that should be displayed as markers */ export declare function convertEventsToSpanEvents(events: Event[], filterTypes?: boolean): SpanEvent[]; export declare const waitEventsToWaitEntity: (events: Event[]) => { waitId: string; runId: string; createdAt: Date; occurredAt?: Date; resumeAt?: Date; completedAt?: Date; } | null; /** * Converts a workflow Wait to an OpenTelemetry Span */ export declare function waitToSpan(events: Event[], maxEndTime: Date): Span | null; export declare const stepEventsToStepEntity: (events: Event[]) => { stepId: string; runId: string; stepName: string; status: "pending" | "running" | "completed" | "failed" | "cancelled"; attempt: number; createdAt: Date; updatedAt: Date; occurredAt?: Date; startedAt?: Date; completedAt?: Date; specVersion?: number; } | null; /** * Converts step events to an OpenTelemetry Span */ export declare function stepToSpan(stepEvents: Event[], maxEndTime: Date): Span | null; export declare const hookEventsToHookEntity: (events: Event[]) => { hookId: string; runId: string; token?: string; createdAt: Date; occurredAt?: Date; receivedCount: number; lastReceivedAt?: Date; disposedAt?: Date; } | null; /** * Converts a workflow Hook to an OpenTelemetry Span */ export declare function hookToSpan(hookEvents: Event[], maxEndTime: Date): Span | null; /** * Creates a root span for the workflow run */ export declare function runToSpan(run: WorkflowRun, runEvents: Event[], nowTime?: Date): Span; //# sourceMappingURL=trace-span-construction.d.ts.map