@uservane/langfuse-push: LangfuseScoreClient
Type Alias: LangfuseScoreClient
Section titled “Type Alias: LangfuseScoreClient”LangfuseScoreClient =
object
Defined in: index.ts:35
Minimal Langfuse surface we use (matches installed SDK; injectable for tests).
Methods
Section titled “Methods”flush()
Section titled “flush()”flush(
callback):void
Defined in: index.ts:56
Drain the ingestion queue and report the result via the callback. We use
flush(cb), NOT flushAsync(): verified against [email protected]
(lib/index.mjs), flushAsync() SWALLOWS an ingestion HTTP failure
(logIngestionError + resolve, never rejects), so it cannot distinguish a
delivered score from a lost one. flush(cb) surfaces the final error (after
the SDK’s own fetch retries) as the callback’s err argument, which is the
only reliable delivery confirmation the SDK exposes.
Parameters
Section titled “Parameters”callback
Section titled “callback”(err?) => void
Returns
Section titled “Returns”void
score()
Section titled “score()”score(
body):unknown
Defined in: index.ts:36
Parameters
Section titled “Parameters”comment?
Section titled “comment?”string | null
string
Stable id so Langfuse UPSERTS on re-push (no duplicate scores).
string
observationId?
Section titled “observationId?”string | null
sessionId?
Section titled “sessionId?”string | null
traceId?
Section titled “traceId?”string | null
Required with observationId for observation-level scores.
number
Returns
Section titled “Returns”unknown