Filter settings
time_to_first_token
Measures time-to-first-token for streaming AI responses.
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 request fact filter: openai_responses_request (Responses create bodies), openai_chat_completions_request (native POST /v1/chat/completions bodies), anthropic_messages_request, or anthropic_messages_to_chat_completions (Anthropic, including Anthropic-to-Chat translation). If none runs before this filter, all TTFT samples are labeled unknown.
Chat traffic that originates as a Responses or Anthropic request and is translated downstream keeps the model its originating classifier promoted.
Example
filter: time_to_first_token