Filter settings

time_to_first_token

Measures time-to-first-token for streaming AI responses.

Praxis AI v0.5.0 (alpha) 1 min read

Switching projects opens that project’s default documentation release.

Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.

On this page

Measures time-to-first-token for streaming AI responses.

Configuration Notes

Activates only for successful text/event-stream responses. On the first non-empty body chunk, records ctx.request_start.elapsed() as a Prometheus histogram and deactivates for the remainder of the response.

The histogram’s model label is read from metadata set by an upstream format filter (openai_responses_format, anthropic_messages_format, or anthropic_messages_to_chat_completions). If no format filter runs before this filter, all TTFT samples are labeled unknown.

Example

filter: time_to_first_token