Skip to content

Route the remaining error-status checks through the shared predicate #3203

Closed

Description

@alex-fedotyev

Context

#3181 pulls the errored-span definition into errorStatusPredicateSql in source.ts, matching both the short OTel status (Error) and the legacy collector form (STATUS_CODE_ERROR), and routes the Services and LLM dashboards through it.

Two other places still decide "is this span an error" on their own, and both miss the legacy form. On a deployment whose collector writes it, those surfaces disagree with the dashboards #3181 fixes.

The remaining spellings

Service map (SQL). hooks/useServiceMap.tsx:178 uses countIf(ServerSpans.statusCode = 'Error'), a case-sensitive exact match, so every node and edge reports errorCount: 0 and 0.00% errors while the Services dashboard reports a non-zero rate for the same spans. components/ServiceMap/ServiceMapTooltip.tsx:81 builds the error drill-down with the same ? = 'Error' literal, so clicking the error stat lands on an empty trace search. Both already read source.statusCodeExpression, so both can call errorStatusPredicateSql.

Trace waterfall (client side). components/DBTraceWaterfallChart.tsx:1086 checks result.StatusCode == 'Error' || result.SeverityText === 'error' (and again for the header count around line 1012), so legacy-form spans are not highlighted and the header reports "0 errors" for a trace the Services dashboard counts as erroring. There is already a TODO on line 1084 naming this exact value.

The waterfall one cannot reuse the SQL helper: it runs over fetched rows, so it needs a JS-side predicate. Worth adding one next to getLogLevelClass in utils.ts and having the two definitions reference each other, so the SQL and client-side answers cannot drift.

Note

Worth deciding at the same time whether log severity should widen too. getLogLevelClass already treats fatal, crit, alert and emerg as errors, while the log-side SQL predicate only matches exactly error, so a FATAL log renders red in the table but is not counted by the LLM Errors tab. That is a pre-existing gap, not something #3181 introduced, but it is the same class of drift.

Activity

  1. added a commit that references this issue on Nov 3, 2026
    d0dd06f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions