Skip to content

Store the request ID on inference logs - #444

Merged
Priyanshu-u07 merged 1 commit into
mainfrom
feat/inference-log-request-id
Oct 26, 2026
Merged

Priyanshu-u07 merged 1 commit into
mainfrom
feat/inference-log-request-id

Conversation

@Priyanshu-u07

Copy link
Copy Markdown
Collaborator

#442 gives every inference request an X-Request-ID, but the stored log row never kept it, so a request seen in a client's error or a log line could not be found in the logs.

  • Add a request_id column and index to inference_logs: global_schema.sql for fresh installs, migration 20261026_inference_logs_request_id.sql for existing ones (idempotent; the index is built CONCURRENTLY after an SPLIT marker, as in 20260530_pool_first_deployments.sql, so it doesn't block inserts).
  • The inference client sends the request's id with each log; the gateway stores it.
  • Return request_id with each log, and let GET /insights/logs filter by it (?request_id=).

Rows logged before this keep request_id null.

Tests: the id is stored (and null without one), the insights filter uses it, the client sends the id of the request being logged. Applied with the repo's migration runner twice: the index is built concurrently and valid, and the second run is a no-op. Full suite with the CI ignore list: 3,073 passed.

Follow-up: show the request ID in the Insights log details and add a search box next to the IP filter.

The inference app gives every request an X-Request-ID (#442); the log row now keeps it, so a request seen in a client's error or a log line can be found. Adds a request_id column (migration for existing installs, index built concurrently), sends it from the inference client, returns it with each log, and lets GET /insights/logs filter by it.

Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
@Priyanshu-u07
Priyanshu-u07 merged commit 0d1b69c into main Oct 26, 2026
2 checks passed
@Priyanshu-u07
Priyanshu-u07 deleted the feat/inference-log-request-id branch October 26, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant