Skip to content

Index

NexusLabs.Needlr.AgentFramework.Langfuse Namespace

Classes
LangfuseDatasetItem A single Langfuse dataset item — one eval case. Upserted via UpsertItemAsync(LangfuseDatasetItem, CancellationToken) and later referenced by an experiment run.
LangfuseEvaluationScoreExtensions Convenience extensions for projecting Microsoft.Extensions.AI.Evaluation results onto a Langfuse scenario trace as scores.
LangfuseException The exception thrown when a request to the Langfuse API fails.
LangfuseOptions Configuration for exporting Needlr agent telemetry and evaluation scores to Langfuse.
LangfuseScoreConfig Declares the shape of a named Langfuse score so the dashboard renders consistent ranges, colors, and category sets and validates incoming values. Created via EnsureScoreConfigAsync(LangfuseScoreConfig, CancellationToken).
LangfuseScoreConfigCategory One allowed category for a Categorical score config.
LangfuseScoreError Describes a single failed attempt to upload an evaluation score to Langfuse. Passed to ScoreErrorCallback when NonFatal is in effect, so callers can log the loss with their own logger.
LangfuseServiceCollectionExtensions Registers Langfuse OTLP export on an Microsoft.Extensions.DependencyInjection.IServiceCollection for ASP.NET Core and generic-host applications.
LangfuseTelemetry Entry point for exporting Needlr agent telemetry to Langfuse without requiring a generic host. Designed for evals, console apps, and test fixtures that build telemetry by hand.
Interfaces
ILangfuseDatasetClient Creates and populates Langfuse datasets — the named collections of eval cases that experiment runs are scored against.
ILangfuseExperimentRun Represents an in-progress Langfuse experiment (dataset run). Each call to BeginItemAsync(string, string, IEnumerable<string>, IReadOnlyDictionary<string,string>, CancellationToken) starts a trace for one dataset item and links it to this run, so the scores recorded on that trace roll up into the run's experiment-comparison view.
ILangfuseScenario Represents a single Langfuse trace scoped to one eval scenario or agent run. Created via BeginScenario(string, string, string, IEnumerable<string>, IReadOnlyDictionary<string,string>).
ILangfuseScoreClient Records Langfuse scores against a known trace id. Registered in dependency injection by AddNeedlrLangfuse(this IServiceCollection, Action<LangfuseOptions>) for ASP.NET Core and generic-host applications that score their own request traces.
ILangfuseScoreConfigClient Idempotently registers Langfuse score configs so eval scores appear on the dashboard with defined data types, ranges, and category sets.
ILangfuseSession Represents an active Langfuse export session. Owns the OpenTelemetry tracer/meter providers that forward Needlr agent telemetry to Langfuse and flushes pending telemetry on disposal.
Enums
LangfuseRegion Identifies the Langfuse deployment that traces and scores are sent to. Used to derive the base URL of the OTLP ingestion endpoint when Host is not set explicitly.
LangfuseScoreDataType The data type of a Langfuse score, controlling how the score value is interpreted and displayed.
LangfuseScoreFailureMode Controls how a Langfuse scenario reacts when uploading an evaluation score to the Langfuse Scores API fails.