import { ExportResult } from '@opentelemetry/core'; import { Span as OTelSpan, SpanProcessor, ReadableSpan as OTelReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base'; import { Context } from '@opentelemetry/api'; import { TraceInfo } from '../core/entities/trace_info'; import { MlflowClient } from '../clients'; export declare class MlflowSpanProcessor implements SpanProcessor { private _exporter; constructor(exporter: SpanExporter); /** * Called when a {@link Span} is started, if the `span.isRecording()` * returns true. * @param span the Span that just started. */ onStart(span: OTelSpan, _parentContext: Context): void; /** * Called when a {@link ReadableSpan} is ended, if the `span.isRecording()` * returns true. * @param span the Span that just ended. */ onEnd(span: OTelReadableSpan): void; /** * Update the trace info with the span end time and status. * @param trace The trace to update * @param span The span to update the trace with */ updateTraceInfo(traceInfo: TraceInfo, span: OTelReadableSpan): void; /** * Shuts down the processor. Called when SDK is shut down. This is an * opportunity for processor to do any cleanup required. */ shutdown(): Promise; /** * Forces to export all finished spans */ forceFlush(): Promise; } export declare class MlflowSpanExporter implements SpanExporter { private _client; private _pendingExports; constructor(client: MlflowClient); export(spans: OTelReadableSpan[], _resultCallback: (result: ExportResult) => void): void; /** * Export a complete trace to the MLflow backend * Step 1: Create trace metadata via StartTraceV3 endpoint * Step 2: Upload trace data (spans) via artifact repository pattern */ private exportTraceToBackend; /** * Force flush all pending trace exports. * Waits for all async export operations to complete. */ forceFlush(): Promise; /** * Shutdown the exporter. * Waits for all pending exports to complete before shutting down. */ shutdown(): Promise; }