mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #15861] [MERGED] feat(logger): Add trace_id and span_id to log #39592
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15861
Author: @tcx4c70
Created: 7/19/2025
Status: ✅ Merged
Merged: 7/19/2025
Merged by: @tjbck
Base:
dev← Head:feat/log/trace_info📝 Commits (1)
739098afeat(logger): Add trace_id and span_id to log📊 Changes
1 file changed (+16 additions, -3 deletions)
View changed files
📝
backend/open_webui/utils/logger.py(+16 -3)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This PR integrates OpenTelemetry tracing information into logging. This improvement facilitates better correlation between logs and traces in distributed systems, improving observability and debugging capabilities.
Added
logger.py: IfENABLE_OTELis enabled and there is a valid span context, it will addtrace_idandspan_idto theextrasof log.Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.