UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

49 lines (48 loc) • 1.36 kB
/** * Langfuse Exporter * Exports spans to Langfuse observability platform */ import type { ExporterHealthStatus, ExportResult, LangfuseExporterConfig, SpanData } from "../../types/index.js"; import { BaseExporter } from "./baseExporter.js"; /** * Langfuse exporter for LLM observability * Supports traces, generations, spans, and scores */ export declare class LangfuseExporter extends BaseExporter { private readonly publicKey; private readonly secretKey; private readonly baseUrl; private readonly release?; private readonly redactIO; constructor(config: LangfuseExporterConfig); initialize(): Promise<void>; exportSpan(span: SpanData): Promise<ExportResult>; exportBatch(spans: SpanData[]): Promise<ExportResult>; flush(): Promise<void>; shutdown(): Promise<void>; healthCheck(): Promise<ExporterHealthStatus>; /** * Verify connectivity to Langfuse API */ protected ping(): Promise<void>; /** * Create a Langfuse trace */ private createTrace; /** * Create a Langfuse span */ private createSpan; /** * Create a Langfuse generation (for LLM calls) */ private createGeneration; /** * Make API call to Langfuse */ private apiCall; /** * Extract tags from span attributes */ private extractTags; }