← Back to Pull requests

drop: [rhoai-3.6] Fix empty `spans.type` for OTLP-ingested spans #916

Open
HumairAK opened this pull request with 90 lines diff across 3 files
View on GitHub
HumairAK HumairAK commented on Dec 01, 2026 19:02 UTC
Author

Summary

Backport https://github.com/mlflow/mlflow/pull/28344 to rhoai-3.6.

OTLP spans whose type is derived from attributes such as gen_ai.operation.name=execute_tool can be visible in individual traces but missing from the Tool calls dashboard because spans.type is empty. Populate that column from the translated attributes, retaining the original-type and UNKNOWN fallbacks.

Cherry-picked upstream commit 2a94f49e46455690835c46a54779416431b32024, preserving DEEPIKA-217M's co-authorship. Resolved branch-specific import and test-placement conflicts while retaining this branch's existing serialization behavior. Includes the upstream storage and metrics regression tests. Existing rows are not backfilled.

Upstream / Downstream Impact

  • Downstream-only change for opendatahub-io/mlflow

  • Also affects upstream mlflow/mlflow

  • No upstream impact / not applicable
  • Merged upstream: https://github.com/mlflow/mlflow/pull/28344
    Original issue: https://github.com/mlflow/mlflow/issues/24237

    Testing

  • CI

  • Unit tests

  • Manual testing

  • Not run (explain why)
  • 40 focused tests passed on this branch, covering both workspace-disabled and workspace-enabled modes. All applicable pre-commit checks passed for the three changed files.

    python -m pytest \
      tests/store/tracking/sqlalchemy_store/test_sqlalchemy_store_traces.py \
      tests/store/tracking/sqlalchemy_store/test_sqlalchemy_store_query_trace_metrics.py \
      -k 'persists_translated_otel_span_type or counts_otel_tool_spans or log_spans_multiple_traces or log_spans_with_single_connection_pool or log_spans_token_usage or log_spans_writes_authoritative_cost_and_model_columns or log_spans_rejects_oversized_promoted_dimensions or query_trace_metrics_span' \
      -q -n 0
    

    The regression tests cover raw OTLP span type translation, explicit type preservation, missing/empty type fallbacks, and metrics queries that count translated tool spans while excluding model spans.

    Diff: 90 lines (+87 / -3) across 3 files Reviewer: jonburdo Review duration: 3381m
    All Vouch review confidence checks passed
    Residual risk 0.09 = Change Risk (0.33) × (1 − Review Confidence (0.73)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 90 lines diff across 3 files
    0.33
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.57 · 3 substantive comment(s)
    0.57
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    72%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.270
    Real PR Conversation Timeline
    6 items
    coderabbitai[bot] coderabbitai[bot] commented on Dec 01, 2026 19:02 UTC
    Bot

    <!-- coderabbit-ai-generated:v1 -->

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- This is an auto-generated comment: skip review by coderabbit.ai -->

    [!IMPORTANT]

    ## Review skipped

    > Auto reviews are disabled on base/target branches other than the default branch.

    >

    > Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

    > <details>

    <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary>

    <dl>

    <dd>

    <br>

    > - Source mode: Auto

    - Repository: Unavailable

    - Branch: Unavailable

    - File: No configuration file from this repository applied

    - Commit: Unavailable

    - Layers: Organization UI

    - Review profile: CHILL

    - Plan: Advanced

    - Run ID: 870049a0-616f-4173-b663-6a5d704e3929

    > </dd>

    </dl>

    </details>

    > You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    > Use the checkbox below for a quick retry:

    - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review

    <!-- end of auto-generated comment: skip review by coderabbit.ai -->

    github-actions[bot] github-actions[bot] commented on Dec 01, 2026 19:02 UTC
    Bot

    <!-- post-codefreeze-gatekeeper -->

    Post-Codefreeze Gatekeeper — FAILED

    Target branch: rhoai-3.6
    Required Jira version: 3.6 GA RHOAI RELEASE

    ❌ The following issues were found:

  • No Jira issue found in PR description. Expected format: RHOAIENG-1234, RHAIENG-1234, RHAI-1234, or AIPCC-1234
  • ---
    <sub>After resolving issues, rerun the <strong>Post-Codefreeze Gatekeeper</strong> workflow in GitHub Actions to revalidate the current PR description.</sub>

    jonburdo jonburdo approved these changes on Dec 01, 2026 20:10 UTC
    Approved Reviewer

    Approved these changes.

    dbasunag dbasunag approved these changes on Dec 01, 2026 20:24 UTC
    Approved Reviewer

    /lgtm

    jonburdo jonburdo commented on Dec 01, 2026 20:57 UTC
    Contributor

    The litellm import failures unrelated. They are due to https://github.com/mlflow/mlflow/pull/21082/changes syncing down. The top level import in that upstream PR's test file really should have been made optional as other test files do.

    Reviewers
    Assignees
    HumairAK HumairAK
    Labels
    risk: low confidence: 72.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 32.9% (LOW) · Higher = larger blast radius
    32.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 72.8% · Lower = rushed or shallow review
    72.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 8.9% · Safe to merge
    8.9%