UNPKG

@genkit-ai/telemetry-server

Version:
52 lines (51 loc) 1.14 kB
import { TraceData } from '@genkit-ai/tools-common'; interface OtlpValue { stringValue?: string; intValue?: number; boolValue?: boolean; arrayValue?: { values: OtlpValue[]; }; } interface OtlpAttribute { key: string; value: OtlpValue; } interface OtlpSpan { traceId: string; spanId: string; parentSpanId?: string; name: string; kind: number; startTimeUnixNano: string; endTimeUnixNano: string; attributes: OtlpAttribute[]; droppedAttributesCount: number; events: any[]; droppedEventsCount: number; status?: { code: number; message?: string; }; links: any[]; droppedLinksCount: number; } interface OtlpScopeSpan { scope: { name: string; version: string; }; spans: OtlpSpan[]; } interface OtlpResourceSpan { resource: { attributes: OtlpAttribute[]; droppedAttributesCount: number; }; scopeSpans: OtlpScopeSpan[]; } interface OtlpPayload { resourceSpans: OtlpResourceSpan[]; } export declare function traceDataFromOtlp(otlpData: OtlpPayload): TraceData[]; export {};