-
[OPIK-6844] [QA] feat: deeper tracing & spans E2E coverage (#7013)
发布于
2026-06-12 07:56:56 +00:00 - [OPIK-6844] [QA] feat: deeper tracing & spans E2E coverage
Extend the E2E seeding harness so a realistic multi-span trace can be
created through the public SDK, and add four T2 panel-depth specs that
exercise the trace detail surface that was previously untested.Harness (services/opik-sdk-driver):
- POST /traces/nested builds a trace with nested child spans (general/
llm/tool), per-span input/output, token usage, cost and metadata, plus
trace-level tags and feedback scores. Avoids the batching data-loss
pitfall (no immediate end() after create) and waits for spans to be
queryable before returning. - POST /feedback-definitions (create/delete) seeds the numerical feedback
definition the UI requires before its manual named-score editor renders. - Typed TS bridge client methods for both.
Fixtures: tracedAgent (multi-span trace) and feedbackDefinition (numerical
def with explicit teardown, namespaced per test).POM: extend TracePanelPage with span-tree, span-detail, tags, and annotate
score (add/edit/delete) interactions.Specs (tests/trace-explore/trace-spans-depth.spec.ts, @t2-cuj @trace-explore):
span tree hierarchy + expand/collapse, LLM span detail (model/tokens/cost),
tag add, and manual feedback score add/edit/delete.FE: add data-testids (trace-tree-node-, annotate-score-row-,
annotate-score-input) and aria-labels (expand/collapse span, clear score)
to back stable selectors.Implements OPIK-6844.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
- fix(e2e): address review on nested-trace seeding
- Validate parent_index as 0 <= parent_index < index so a negative value
can't bypass the check and silently reuse the last span. - Confirm trace visibility by unique id rather than name (trace names are
not unique within a project). - Drop the misleading workspace param from deleteFeedbackDefinition; the
bridge resolves workspace from its env, matching the create path.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件