< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Langfuse.LangfuseScore
Assembly: NexusLabs.Needlr.AgentFramework.Langfuse
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Langfuse/LangfuseScore.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 43
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_TraceId()100%11100%
get_Name()100%11100%
get_Value()100%11100%
get_DataType()100%11100%
get_ObservationId()100%11100%
get_SessionId()100%11100%
get_DatasetRunId()100%11100%
get_Comment()100%11100%
get_Id()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Langfuse/LangfuseScore.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Langfuse;
 2
 3/// <summary>
 4/// Serializable payload for a single Langfuse score ingested via the public Scores API.
 5/// </summary>
 6/// <remarks>
 7/// Property names are projected to camelCase by the score client to match the Langfuse REST
 8/// contract. <see cref="Value"/> is a <see cref="double"/> for numeric and boolean scores and a
 9/// <see cref="string"/> for categorical and text scores.
 10/// </remarks>
 11internal sealed record LangfuseScore
 12{
 13    /// <summary>
 14    /// Gets the id of the trace the score is attached to. Optional: a score may instead target a
 15    /// session (<see cref="SessionId"/>) or dataset run (<see cref="DatasetRunId"/>). Required when
 16    /// <see cref="ObservationId"/> is set.
 17    /// </summary>
 2518    public string? TraceId { get; init; }
 19
 20    /// <summary>Gets the score name (for example an evaluator metric name). Required.</summary>
 2821    public required string Name { get; init; }
 22
 23    /// <summary>Gets the score value: a number for numeric/boolean, a string for categorical/text.</summary>
 2524    public required object Value { get; init; }
 25
 26    /// <summary>Gets the Langfuse data type token (<c>NUMERIC</c>, <c>BOOLEAN</c>, <c>CATEGORICAL</c>, <c>TEXT</c>).</s
 2527    public required string DataType { get; init; }
 28
 29    /// <summary>Gets the optional id of a specific observation within the trace to attach the score to.</summary>
 2230    public string? ObservationId { get; init; }
 31
 32    /// <summary>Gets the optional id of a session to attach the score to (session-level scoring).</summary>
 2233    public string? SessionId { get; init; }
 34
 35    /// <summary>Gets the optional id of a dataset run to attach the score to (experiment-level scoring).</summary>
 1136    public string? DatasetRunId { get; init; }
 37
 38    /// <summary>Gets the optional free-text comment that accompanies the score.</summary>
 2339    public string? Comment { get; init; }
 40
 41    /// <summary>Gets the optional client-supplied id used as an idempotency key.</summary>
 1142    public string? Id { get; init; }
 43}