Class StreamDiagnostics
Captures observability data about a single SSE streaming round. Populated by the SSE reader and surfaced via StreamOptions.DiagnosticsCallback or attached to StreamReadException when a read fails. Lets callers tell "stream silently ended" apart from "transport error after N chunks".
public class StreamDiagnostics
- Inheritance
-
StreamDiagnostics
- Inherited Members
Properties
AccumulatedTextLength
Total characters appended to the assistant text buffer during this round.
public long AccumulatedTextLength { get; set; }
Property Value
DataLinesProcessed
Number of lines the provider's chunk parser accepted as content.
public int DataLinesProcessed { get; set; }
Property Value
Elapsed
Wall-clock time spent reading the stream.
public TimeSpan Elapsed { get; set; }
Property Value
LastRawLine
The most recent raw SSE line received. Useful when the stream dies mid-line — reveals whether the last line was truncated or non-standard.
public string? LastRawLine { get; set; }
Property Value
LinesRead
Total raw lines read from the SSE stream (including comments, blank lines, and "data:" lines). Reaches the line that triggered a failure, if any.
public int LinesRead { get; set; }
Property Value
ParseFailures
Number of lines that hit a parse failure (typically swallowed by the provider's per-chunk catch block).
public int ParseFailures { get; set; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.