litellm/litellm-rust/crates/traces/src
ishaan-berri 03ba79d261
feat(lens): show end-user feedback on traces, stored in ClickHouse (#45171)
* feat(lens): add lens_feedback ClickHouse table for human trace scores

ReplacingMergeTree(UpdatedAt, IsDeleted) keyed like agent_traces_by_key so
feedback joins traces in sort order, with a bloom filter on TraceId, a score
CHECK, and the same retention as traces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens): add scoped ClickHouse reads for trace feedback

feedback_target resolves a visible trace's team, key and trace_ref before a
write; feedback lists the latest live entry per author; feedback_summary
returns count, average and lowest score for a batch of traces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(lens): pin the Claude session to trace id hash shared with feedback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens): expose feedback queries to the Python trace bridge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens): add typed feedback models and ClickHouse feedback store

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens): add /lens/feedback API for 0-10 human scores on traces

PUT saves or replaces the caller's score and comment, GET lists every
entry, DELETE removes the caller's, POST /summary feeds the trace list.
Callers can target a trace_id or a Claude Code session_id

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens-ui): add typed feedback calls to the traces API

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens-ui): flag rated traces and filter the list by feedback

A Feedback column shows each run's average score and rating count, marked
red when any score is 4 or below, and a filter narrows to rated or
low-score runs through the URL

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens-ui): show and edit human feedback inside a trace

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens): let app keys post end-user feedback on their own traces

Any key can now PUT/DELETE feedback on traces its team or key sent, naming
the end user in an optional user field. Reading feedback stays with Lens
admins

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(lens-ui): show end-user feedback first in a run and flag low-scored rows

Replace the edit popover and feedback filter with a read-only view: the
list shows each run's score in a fixed-width badge and tints the row red
when a user scored it 4 or below, and opening a run shows what users said
with their score right under the header

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:14:30 -07:00
..
bin feat(tracing)!: return only data from SQL queries (#44609) 2026-10-05 12:11:59 -07:00
normalize fix(lens): show the first user message as the run input (#44958) 2026-10-06 16:30:52 -07:00
otlp fix(tracing): retain native logs and headless tool results (#44894) 2026-10-06 13:51:38 -07:00
query feat(lens): show agent, user and slack thread first in the run header (#45261) 2026-10-07 20:01:55 -07:00
resolve feat(lens): show agent, user and slack thread first in the run header (#45261) 2026-10-07 20:01:55 -07:00
error.rs feat: improve Lens dev seeding and live UI (#44468) 2026-10-04 01:03:11 +00:00
lib.rs feat(lens): link traces to the conversation that started them (#45169) 2026-10-07 22:32:37 +00:00
query.rs feat(lens): show end-user feedback on traces, stored in ClickHouse (#45171) 2026-10-07 20:14:30 -07:00
query_access.rs feat(traces): tracing development seed (#44363) 2026-10-03 09:59:51 +00:00
request.rs refactor(tracing): generate existing HTTP request models from Rust schemas (#44591) 2026-10-05 17:37:52 +00:00
response.rs feat(tracing)!: return only data from SQL queries (#44609) 2026-10-05 12:11:59 -07:00
schema.rs feat(tracing)!: return only data from SQL queries (#44609) 2026-10-05 12:11:59 -07:00
shared.rs feat: improve trace ingestion and trace details (#43975) 2026-10-01 13:45:33 -07:00
tenant.rs feat(traces): tracing development seed (#44363) 2026-10-03 09:59:51 +00:00
truncate.rs feat(traces): tracing development seed (#44363) 2026-10-03 09:59:51 +00:00
ui.rs feat(lens): add datasets built from real traces (#44765) 2026-10-06 23:04:43 +00:00
view.rs feat(lens): show agent, user and slack thread first in the run header (#45261) 2026-10-07 20:01:55 -07:00
wire.rs feat(traces): tracing development seed (#44363) 2026-10-03 09:59:51 +00:00