Skip to main content

Advanced Use Cases

Fetch spans of a specific traceId
Filter spans by model spanType using the tfy.span_type span attribute filter with value Model.
Filter spans based on custom metadata keys and values that were passed to Gateway requests using the X-TFY-METADATA header.
Filter spans that have MCP in the span name.
Fetch model spans by filtering with tfy.span_type span attribute filter with value Model, and then further filter by model name using the tfy.model.name span attribute filter.
Requests for a model that does not exist and requests the caller is not allowed to use both return HTTP 403 with the same client message. Filter on tfy.error_type (tfy-model-not-found vs tfy-forbidden). The attribute is on the Model span. See Authorization vs missing model.
A client that hangs up mid-stream is recorded as tfy.error_type=client-disconnected with HTTP 499, and may still carry cost. Filter on the Model span. See Cancelled and disconnected streams.
A streaming request that never produced a first chunk within x-tfy-ttft-timeout-ms is recorded as tfy.error_type=ttft-timeout with HTTP 408. Filter on the Model span. See First Chunk Gate.