Skip to content

refactor(experiments): Rename evaluation span-attribute bag key - #1238

Open
shanaiabuggy wants to merge 2 commits into
mainfrom
sbuggy/ase-816
Open

refactor(experiments): Rename evaluation span-attribute bag key#1238
shanaiabuggy wants to merge 2 commits into
mainfrom
sbuggy/ase-816

Conversation

@shanaiabuggy

@shanaiabuggy shanaiabuggy commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the evaluation span-attribute bag key nemo.experiment.idnemo.evaluation.name
(finishing the Experiment→Evaluation rename; the value has always been the Evaluation's name).
Unlike a hard cutover, this is a safe transition: ingest still accepts the legacy
nemo.experiment.id and normalizes it to the canonical key, and the trace_index MV backfill
coalesces both keys, so producers migrate independently and already-ingested spans keep their
evaluation association.

Related Issue

Linear: ASE-816 — Rename evaluation span-attribute bag key: nemo.experiment.idnemo.evaluation.name

Changes

Intake ingest (consumer)

  • span_attribute_catalog.py: EVALUATION_NAME bag key is now nemo.evaluation.name, with
    source_keys=("nemo.evaluation.name", "nemo.experiment.id") so either key is accepted on ingest
    and stored under the canonical key.
  • clickhouse_migrations.py: new ch_trace_index_0006_nemo_evaluation_name migration rebuilds the
    trace_index MV; evaluation_id is now resolved via coalesce(new key, legacy key) so the backfill
    stays lossless for spans already stored under nemo.experiment.id (no spans data migration).
  • Internal rename SpanAttributeField.EVALUATION_IDEVALUATION_NAME and the OTLP ingest locals
    (evaluation_names/_EVALUATION_NAME_BAG_KEY). No API/wire change.

Producers migrated to emit nemo.evaluation.name

  • experimentalist backend + tau3 example, insights testbed (otlp_build, adapters, re-ingest stub),
    and the intake span seed script.

Docs/skills

  • experiments.mdx, intake README, and the nemo-intake / nemo-experiments-upload skills now teach
    nemo.evaluation.name with a "legacy nemo.experiment.id still accepted" note. SDK skill copies
    re-vendored via make vendor-nemo-platform-ext.

Also leaves TODO notes where producer params named experiment_id carry the evaluation name, to be
plumbed to evaluation_name alongside the future Experiment→Evaluation entity rename (out of scope here).

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification:

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

  • uv run ruff check + uv run --frozen ty check on changed intake sources — all checks passed.
  • uv run --frozen pytest services/intake/tests -k "spans_clickhouse or spans_otlp or atif_v17" — 60 passed.
  • uv run --frozen pytest plugins/nemo-experimentalist/tests/test_otlp.py — 27 passed;
    plugins/nemo-insights/tests/testbed/{test_otlp_build,test_adapters,test_reingest}.py — 143 passed.
  • make refresh-openapi produced a zero diff (no API surface change; make update-sdk not needed).
  • Not run: services/intake/tests/integration/spans/test_traces_read.py (requires a live ClickHouse);
    it intentionally emits the legacy key to exercise the dual-read/coalesce path end-to-end in CI.
  • uv run pre-commit run -a not run locally; targeted ruff/ty/pytest run instead.

Summary by CodeRabbit

  • Enhancements

    • Standardized evaluation identification on the nemo.evaluation.name telemetry attribute.
    • Continued support for the legacy nemo.experiment.id attribute to preserve compatibility with existing traces.
    • Improved trace ingestion, association, and indexing during the attribute transition.
  • Documentation

    • Updated telemetry setup, troubleshooting, and integration guidance to reflect the canonical evaluation attribute.
  • Tests

    • Added coverage confirming legacy attributes are normalized and evaluation associations remain intact.

Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy
shanaiabuggy requested review from a team as code owners August 11, 2026 18:04
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4b8fc1a5-1b4a-4508-9d5f-799f34d4ba89

📥 Commits

Reviewing files that changed from the base of the PR and between 4a090ff and c9b2424.

📒 Files selected for processing (1)
  • services/intake/tests/integration/spans/test_clickhouse_bootstrap.py

📝 Walkthrough

Walkthrough

Changes

The OTLP evaluation attribute changed from nemo.experiment.id to canonical nemo.evaluation.name. Intake normalization, trace-index migration, trace producers, tests, fixtures, and documentation retain legacy-key compatibility.

Suggested reviewers: briannewsom

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% 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 The title clearly and concisely describes the main change: renaming the evaluation span-attribute bag key.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sbuggy/ase-816

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

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 31998/40622 78.8% 63.5%
Integration Tests 18551/38548 48.1% 20.8%

Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
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.

1 participant