-
Notifications
You must be signed in to change notification settings - Fork 2.3k
pass through various id's and log them in the model server for better… #4485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces enhanced traceability by passing unique request and tenant IDs throughout the indexing and model server flow, with structured IDs added for better correlation across logs and metrics.
- backend/onyx/background/indexing/run_indexing.py: Adds attempt_id, request_id, and structured_id to IndexAttemptMetadata and generates new IDs per batch.
- backend/ee/onyx/server/middleware/tenant_tracking.py: Implements multi-method tenant ID extraction but has a logic flaw in _get_tenant_id_from_request’s finally block.
- backend/onyx/indexing/indexing_pipeline.py: Passes tenant_id and request_id when invoking embed_chunks_with_failure_handling.
- backend/onyx/indexing/embedder.py: Updates embed_chunks signature to accept tenant_id/request_id; note fallback title embedding lacks tenant_id.
- Additional updates (middleware, chunker, models): Ensure consistent tenant/request ID propagation to support improved logging and observability.
10 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
onyx-dot-app#4485) * pass through various id's and log them in the model server for better tracking * fix test --------- Co-authored-by: Richard Kuo (Onyx) <[email protected]>
onyx-dot-app#4485) * pass through various id's and log them in the model server for better tracking * fix test --------- Co-authored-by: Richard Kuo (Onyx) <[email protected]>
onyx-dot-app#4485) * pass through various id's and log them in the model server for better tracking * fix test --------- Co-authored-by: Richard Kuo (Onyx) <[email protected]>
… tracking
Description
Fixes DAN-1785.
https://linear.app/danswer/issue/DAN-1785/create-request-ids-during-indexing-and-handle-in-model-server
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.