Skip to main content

parse_session_log

Function parse_session_log 

Source
pub fn parse_session_log(
    bytes: &[u8],
    observed_at_epoch_s: u64,
    context_window_tokens: Option<u64>,
) -> TelemetryResult<Option<PressureObservation>>
Expand description

Parse a Claude Code session log byte slice directly. Useful for testing and for callers that already have the log in memory.

observed_at_epoch_s is the mtime the caller wants stamped on the resulting observation (typically the file mtime).