|
| 1 | +<!-- Language: en-US --> |
| 2 | +<p><a href="./README.md">📋 All Versions</a> <span style="float:right"><b>English</b> | <a href="../../zh-CN/release-notes/1.10.2.md">简体中文</a></span></p> |
| 3 | + |
| 4 | +# Chats 1.10.2 Release Notes |
| 5 | + |
| 6 | +> Release Date: 2026-03-10 (47 commits since main) |
| 7 | +
|
| 8 | +1.10.2 is an observability-focused release centered on **Request Trace**. It introduces **inbound and outbound HTTP request tracing**, a new **admin request trace workspace**, and **configurable sampling, filtering, redaction, and retention policies**, together with export, compare, bulk delete, and scheduled cleanup support. It also includes a small set of admin dashboard, message UX, and Anthropic compatibility improvements. |
| 9 | + |
| 10 | +## 🎯 Core Features |
| 11 | + |
| 12 | +### 1) Request Trace: end-to-end inbound and outbound HTTP tracing |
| 13 | + |
| 14 | +- 🔍 **Two-way capture**: adds `InboundRequestTraceMiddleware` and `OutboundRequestTraceHandler` to trace both inbound user requests and outbound service-to-service HTTP calls. |
| 15 | +- 🧭 **Trace metadata**: records `TraceId`, user, source, HTTP method, full URL, status code, error type, and key timestamps for request start, request body completion, response header completion, and response body completion. |
| 16 | +- 📦 **Body and raw payload capture**: stores request/response headers, text bodies, raw binary payloads, and body length statistics for troubleshooting encoding, compression, and gateway passthrough issues. |
| 17 | +- 🔗 **Broader backend coverage**: request tracing is wired into multiple outbound HTTP call paths, making it easier to correlate upstream requests with downstream dependency behavior. |
| 18 | + |
| 19 | +### 2) New admin request trace workspace |
| 20 | + |
| 21 | +- 🧑💼 **Dedicated admin page**: adds `/admin/request-trace` to the admin navigation for centralized trace inspection. |
| 22 | +- 🔎 **Advanced filtering**: supports filtering by time range, URL, TraceId, username, and direction, with query state preserved in the URL for refresh and sharing. |
| 23 | +- 🧱 **24 selectable columns**: allows per-scenario column selection and persists visible columns in URL query parameters. |
| 24 | +- 👀 **Details and downloads**: each trace supports full request/response header and body inspection, `.dump` export, and raw request/response binary downloads, with explicit guidance when the response body is binary-only. |
| 25 | +- 🆚 **Two-trace compare**: supports side-by-side comparison for two selected traces, with an option to hide identical fields. |
| 26 | +- 📤 **Export and cleanup**: supports Excel export for the current filter set (up to 10000 rows) and bulk deletion by current filters. |
| 27 | + |
| 28 | +### 3) Configurable capture rules, redaction, and retention |
| 29 | + |
| 30 | +- ⚙️ **Independent inbound/outbound config**: inbound and outbound tracing can be enabled and tuned separately for sample rate, minimum duration, header/body capture, and retention days. |
| 31 | +- 🎯 **Include/exclude filters**: supports include and exclude rules by source, URL patterns, HTTP methods, and status codes, with quick presets for common gateway scenarios. |
| 32 | +- 🕶️ **Redaction improvements**: adds configurable URL parameter redaction and improves default redaction ordering to reduce the risk of sensitive values being stored. |
| 33 | +- ♻️ **Hot refresh**: trace configuration is stored in the database config table and refreshed by a background service without requiring a restart. |
| 34 | + |
| 35 | +## 🏗️ Architecture & Engineering |
| 36 | + |
| 37 | +### 1) Persistence and lifecycle management |
| 38 | + |
| 39 | +- 🗄️ **Two-table storage model**: adds `RequestTrace` and `RequestTracePayload`, separating metadata from large payload content and keeping them consistent through cascading delete. |
| 40 | +- 📇 **Indexes and scheduled cleanup**: adds indexes on `StartedAt`, `UserId`, `TraceId`, and `ScheduledDeleteAt`; scheduled cleanup runs every 30 minutes to remove expired traces. |
| 41 | +- 🚦 **Queue protection**: adds `RequestTraceQueue:Capacity` and uses a bounded in-memory queue with `DropWrite` behavior to protect the main request path under pressure. |
| 42 | +- 🧵 **Async persistence**: tracing persistence is queue-based and asynchronous, reducing synchronous I/O pressure while keeping multi-stage timing and exception capture intact. |
| 43 | + |
| 44 | +### 2) Stability refinements for the tracing pipeline |
| 45 | + |
| 46 | +- 🧪 **Edge-case test coverage**: adds unit tests for `CaptureStreams`, `ObservedHttpContent`, `RequestTraceHelper`, `RequestTracePersistService`, and `RequestTraceQueue`. |
| 47 | +- 🛡️ **Stability fixes**: fixes missing 401 inbound traces, empty-pattern matching, details dialog overflow, redundant payload deletion, and binary/JSON presentation issues. |
| 48 | +- 🧰 **Config capacity**: expands `Config.Value` to `NVARCHAR(MAX)` so larger JSON trace configs can be stored safely. |
| 49 | + |
| 50 | +## 🎨 Other Improvements |
| 51 | + |
| 52 | +### Admin dashboard and message UX |
| 53 | + |
| 54 | +- 📊 **Dashboard summary cards**: admin summary cards now compute chat count and active users based on the currently selected time range. |
| 55 | +- ✂️ **User message collapse**: long user messages can now collapse inside the message bubble with an approximately 5.5-line preview. |
| 56 | +- 🧠 **Thinking display refinement**: removes the fixed max-height cap from `ThinkingMessage` expansion so long reasoning content behaves more naturally. |
| 57 | + |
| 58 | +### Protocol compatibility and dependency updates |
| 59 | + |
| 60 | +- 🔧 **Anthropic compatibility fixes**: fixes lost tool results during Anthropic message conversion (#122) and improves thinking signature compatibility for the DeepSeek Anthropic protocol path. |
| 61 | +- 🔤 **Readable MCP JSON**: preserves readable Unicode when fetching MCP tool input schemas instead of over-escaping JSON. |
| 62 | +- ⬆️ **Frontend dependency update**: upgrades the frontend to `Next.js 16.1.6` and aligns related browser compatibility dependencies. |
| 63 | + |
| 64 | +## 🐛 Stability Fixes |
| 65 | + |
| 66 | +- Fixes Request Trace default redaction ordering and field ordering issues. |
| 67 | +- Fixes request/response capture timing so traces can start earlier and body capture becomes more complete. |
| 68 | +- Fixes scrolling and overflow behavior in the Request Trace details dialog for long headers and long bodies. |
| 69 | +- Simplifies the include/exclude rule organization in the trace config dialog to reduce configuration friction. |
| 70 | + |
| 71 | +## ⬆️ Upgrade Notes |
| 72 | + |
| 73 | +- Run DB migration: `src/scripts/db-migration/1.10/1.10.2.sql` |
| 74 | + - Adds the `RequestTrace` main table and the `RequestTracePayload` payload table |
| 75 | + - Adds indexes for `StartedAt`, `UserId`, `TraceId`, and `ScheduledDeleteAt` |
| 76 | + - Expands `Config.Value` to `NVARCHAR(MAX)` to support larger JSON configuration payloads |
| 77 | +- New config keys: |
| 78 | + - `RequestTraceQueue:Capacity`: controls the in-memory request trace queue capacity, default `1000` |
| 79 | + - `RequestTraceCleanup:Enabled`: controls scheduled auto-cleanup, default `true` |
| 80 | +- Upgrading does not automatically enable Request Trace for all traffic; the actual capture scope still depends on the inbound/outbound tracing rules, sample rate, and retention policy configured by the admin. |
| 81 | +- If you plan to enable request tracing in a high-concurrency environment, set sample rate, URL filters, and retention days first to avoid unnecessary database write and storage pressure. |
0 commit comments