Request Tracing
Correlate client requests with Alfa API responses using the x-request-id header.
Correlate client requests with Alfa API responses using the x-request-id header.
This API is currently in Preview.
Every request to the Alfa API can be tagged with an x-request-id header. Alfa echoes the same value back on the response, making it easy to correlate a client-side call with the corresponding Alfa request.
x-request-id is supported on all alfa-preview endpoints, excluding gRPC endpoints.
The header value is returned on both successful responses and error responses, so you can capture it even when a request fails.
We recommend passing a UUID (v4 or v7) per logical client request. Values should be:
x-request-id works the same way on HTTP streaming endpoints. For SSE, send the header on the initial request and read it from the response headers before the stream begins. For gRPC, it is currently ignored.
No. If you omit it, It will be omitted from the response.
That is up to you. Reusing the same ID makes it easy to group retries together in logs; generating a new ID per attempt makes it easier to distinguish them. We recommend a new ID per attempt so you can differentiate the successful from failed requests.