Repository navigation
docs: document request_correlation_in_logs and StandardLoggingPayload.session_id - #645
Merged
yassin-berriai merged 4 commits intoAug 10, 2026
Conversation
….session_id Covers the opt-in trace_id/session_id stamping added to litellm's proxy logging: the litellm_settings flag, plaintext and JSON log examples, and the new independent session_id field on StandardLoggingPayload.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks done
…_logs Documents the control-character-stripping and 256-char length bound added to set_trace_id/set_session_id (litellm/_logging.py) so callers aren't surprised by a modified or truncated custom session id.
The corresponding OSS PR scoped the feature to the async path (the proxy and litellm.acompletion()) after review found a cross-request log misattribution bug specific to the sync entry point on a reused thread pool worker. Sync support is planned as a follow-up rather than shipped here.
…lation request_correlation_in_logs now falls back to the standard W3C Trace Context traceparent header and W3C Baggage header when the litellm-specific headers aren't set, so a caller with existing OpenTelemetry instrumentation gets matching trace_id/session_id values instead of an unrelated generated id.
yassin-berriai
approved these changes
Aug 7, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the opt-in
request_correlation_in_logsflag added in BerriAI/litellm#34418, which stamps proxy log lines (plaintext or JSON) with the request'strace_idandsession_id, and adds an independentsession_idfield toStandardLoggingPayloadChanges
New "Request Correlation IDs" section in
docs/proxy/debugging.md, covering the config flag, example plaintext and JSON log lines, and a pointer to the newStandardLoggingPayloadfieldNew table row for
request_correlation_in_logsindocs/proxy/config_settings.md, alongside the existingjson_logsentryNew
session_idrow in theStandardLoggingPayloadfield table indocs/proxy/logging_spec.md