Skip to content

LangfuseMetricsResult

NexusLabs.Needlr.AgentFramework.Langfuse

LangfuseMetricsResult Class

The result of a LangfuseMetricsQuery. Each row is a dictionary of column name to value; aggregated columns are named {Aggregation}_{Measure} and dimension columns keep their field name.

public sealed class LangfuseMetricsResult

Inheritance System.Object 🡒 LangfuseMetricsResult

Properties

LangfuseMetricsResult.Rows Property

Gets the result rows.

public System.Collections.Generic.IReadOnlyList<System.Collections.Generic.IReadOnlyDictionary<string,System.Text.Json.JsonElement>> Rows { get; }

Property Value

System.Collections.Generic.IReadOnlyList<System.Collections.Generic.IReadOnlyDictionary<System.String,System.Text.Json.JsonElement>>

Methods

LangfuseMetricsResult.GetScalar(string, string) Method

Gets the numeric value of the {aggregation}_{measure} column from the first row, or null when there are no rows or the column is absent or non-numeric. Use this for ungrouped queries that produce a single aggregate row.

public System.Nullable<double> GetScalar(string aggregation, string measure);

Parameters

aggregation System.String

The aggregation (for example avg).

measure System.String

The measure (for example value).

Returns

System.Nullable<System.Double>
The scalar value, or null.