Skip to content

feat(intake): add payload previews to telemetry lists#725

Merged
BrianNewsom merged 3 commits into
mainfrom
brnewsom/ase-169-show-inputoutput-on-tracesspans-table
Jul 16, 2026
Merged

feat(intake): add payload previews to telemetry lists#725
BrianNewsom merged 3 commits into
mainfrom
brnewsom/ase-169-show-inputoutput-on-tracesspans-table

Conversation

@BrianNewsom

@BrianNewsom BrianNewsom commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added a preview response mode for evaluation sessions, spans, and traces.
    • preview returns input/output previews truncated to 300 characters (spans include 1000-char error-message truncation); summary omits these fields; detailed returns full payloads.
    • Traces list now defaults to preview and includes rollups plus span-count for this mode.
    • Studio tables display input/output previews for sessions, spans, and traces.
  • Documentation
    • Updated OpenAPI mode parameter and schema field semantics; expanded preview behavior across endpoints.
    • Updated CLI help text to include preview.
  • Tests
    • Expanded API and UI test coverage for mode-specific inclusion, truncation, and defaults.

@BrianNewsom
BrianNewsom requested review from a team as code owners July 16, 2026 16:11
@github-actions github-actions Bot added the feat label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Intake APIs now support summary, preview, and detailed payload modes with shared 300-character preview shaping. ClickHouse queries, API schemas, CLI commands, tests, and Studio tables were updated accordingly.

Changes

Mode contracts and text shaping

Layer / File(s) Summary
Shared response modes and API contracts
services/intake/src/nmp/intake/spans/{domain.py,storage.py}, services/intake/src/nmp/intake/.../*schemas.py, packages/nemo_platform_ext/..., openapi/**/*.yaml
Adds preview, shared payload shaping, CLI support, and matching API documentation.

Evaluation session payload flow

Layer / File(s) Summary
Mode-aware session queries and responses
services/intake/src/nmp/intake/api/v2/experiments/*, services/intake/src/nmp/intake/spans/evaluation_session_repository.py, services/intake/tests/*session*
Session listing passes mode through validation, ClickHouse SQL, row mapping, response construction, and tests.

Span and trace payload flow

Layer / File(s) Summary
Mode-aware span and trace retrieval
services/intake/src/nmp/intake/spans/{api,service.py,*repository.py}, services/intake/tests/{test_spans*,test_traces*,integration/spans/*}
Span and trace endpoints apply mode-specific SQL projections, previews, rollups, serialization, and validation.

Studio preview tables

Layer / File(s) Summary
Preview payload rendering
web/packages/studio/src/components/IntakeLists/*, web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/*, web/packages/studio/src/mocks/intake/telemetry.ts
Studio tables request preview and render input/output through IntakePayloadPreviewCell.

Sequence Diagram(s)

sequenceDiagram
  participant Studio
  participant IntakeAPI
  participant ClickHouse
  Studio->>IntakeAPI: Request spans or traces with mode=preview
  IntakeAPI->>ClickHouse: Select bounded payloads and preview rollups
  ClickHouse-->>IntakeAPI: Return 300-character payload fields
  IntakeAPI-->>Studio: Render mode-shaped response
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.41% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title matches the main change: adding preview payloads to intake telemetry list views.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brnewsom/ase-169-show-inputoutput-on-tracesspans-table

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@services/intake/tests/test_spans_clickhouse_repository.py`:
- Around line 152-154: Update the detailed-mode SQL assertions in the relevant
test to match the aliases emitted by _span_select_columns(mode="detailed"),
checking for “input AS input, output AS output” rather than the absent “input,
output” substring. Preserve the existing assertions that substringUTF8(input)
and payload_char_limit are not used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 15093c4d-e3da-43f9-bfb7-64b3e1f68347

📥 Commits

Reviewing files that changed from the base of the PR and between 16cc47a and 215878a.

📒 Files selected for processing (32)
  • openapi/ga/individual/platform.openapi.yaml
  • openapi/ga/openapi.yaml
  • openapi/openapi.yaml
  • services/intake/src/nmp/intake/api/v2/experiments/endpoints.py
  • services/intake/src/nmp/intake/api/v2/experiments/schemas.py
  • services/intake/src/nmp/intake/spans/api/spans.py
  • services/intake/src/nmp/intake/spans/api/spans_schemas.py
  • services/intake/src/nmp/intake/spans/api/traces.py
  • services/intake/src/nmp/intake/spans/api/traces_schemas.py
  • services/intake/src/nmp/intake/spans/domain.py
  • services/intake/src/nmp/intake/spans/evaluation_session_repository.py
  • services/intake/src/nmp/intake/spans/service.py
  • services/intake/src/nmp/intake/spans/span_repository.py
  • services/intake/src/nmp/intake/spans/storage.py
  • services/intake/src/nmp/intake/spans/trace_repository.py
  • services/intake/tests/integration/spans/test_chat_completions_ingest.py
  • services/intake/tests/integration/spans/test_experiment_sessions.py
  • services/intake/tests/integration/spans/test_traces_read.py
  • services/intake/tests/test_evaluation_session_clickhouse_repository.py
  • services/intake/tests/test_experiment_session_schemas.py
  • services/intake/tests/test_spans_clickhouse_repository.py
  • services/intake/tests/test_spans_schemas.py
  • services/intake/tests/test_spans_storage.py
  • services/intake/tests/test_traces_clickhouse_repository.py
  • web/packages/studio/src/components/IntakeLists/IntakePayloadPreviewCell.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeSpansTable.test.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeSpansTable.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeTracesTable.test.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeTracesTable.tsx
  • web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.test.tsx
  • web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsx
  • web/packages/studio/src/mocks/intake/telemetry.ts

Comment thread services/intake/tests/test_spans_clickhouse_repository.py Outdated
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 25521/32723 78.0% 62.6%
Integration Tests 14723/31372 46.9% 19.3%

Signed-off-by: Brian Newsom <[email protected]>
@BrianNewsom
BrianNewsom requested a review from shanaiabuggy July 16, 2026 17:01
Comment thread services/intake/src/nmp/intake/spans/api/traces.py Outdated
@BrianNewsom
BrianNewsom enabled auto-merge July 16, 2026 17:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openapi/ga/individual/platform.openapi.yaml`:
- Line 4433: Restore the trace-list.mode default to detailed in all three
affected specs: openapi/ga/individual/platform.openapi.yaml:4433-4433,
openapi/ga/openapi.yaml:4433-4433, and openapi/openapi.yaml:4433-4433. Do not
introduce the preview default without a versioned breaking change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 641b6009-ebea-48b1-9309-6e2e4b14350f

📥 Commits

Reviewing files that changed from the base of the PR and between ddff703 and eb55696.

⛔ Files ignored due to path filters (1)
  • sdk/python/nemo-platform/.nmpcontext/openapi.yaml is excluded by !sdk/**
📒 Files selected for processing (5)
  • openapi/ga/individual/platform.openapi.yaml
  • openapi/ga/openapi.yaml
  • openapi/openapi.yaml
  • services/intake/src/nmp/intake/spans/api/traces.py
  • services/intake/tests/integration/spans/test_traces_read.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • services/intake/src/nmp/intake/spans/api/traces.py
  • services/intake/tests/integration/spans/test_traces_read.py

Comment thread openapi/ga/individual/platform.openapi.yaml
@BrianNewsom
BrianNewsom disabled auto-merge July 16, 2026 17:53
@BrianNewsom
BrianNewsom enabled auto-merge July 16, 2026 17:53
@BrianNewsom
BrianNewsom added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit 9215278 Jul 16, 2026
57 checks passed
@BrianNewsom
BrianNewsom deleted the brnewsom/ase-169-show-inputoutput-on-tracesspans-table branch July 16, 2026 18:24
soluwalana pushed a commit that referenced this pull request Jul 17, 2026
* feat(intake): add payload previews to telemetry lists

Signed-off-by: Brian Newsom <[email protected]>

* chore: lint fixes

Signed-off-by: Brian Newsom <[email protected]>

* fix(intake): change default trace mode to preview

Signed-off-by: Brian Newsom <[email protected]>

---------

Signed-off-by: Brian Newsom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants