Skip to content

tracing(csharp): query timeout threshold not on the failing Execute span #478

@eric-wang-1990

Description

@eric-wang-1990

Severity: Medium

Observation

When StatementTests.StatementTimeoutTest triggers a TimeoutException (e.g. QueryTimeoutSeconds=5 against a long count-over-join), the trace correctly captures Status=Error on HiveServer2Statement.ExecuteQueryAsyncInternal with exception.type=TTransportException, exception.message="The operation was canceled.", and event chain cancel_operation.startingcancel_operation.completed (with db.response.status_code=SUCCESS_STATUS — server acked the cancel).

But the configured timeout value (adbc.apache.statement.query_timeout_s = "5") lives only on the CreateSessionRequest of a different TraceId. The timing-out span carries no threshold tag. An operator reading just the failing span sees "Duration=5.30s" and has to do math to infer "this was a 5s timeout."

Suggested fix

Copy the live query_timeout_s (and other relevant statement-level config like polltime_ms, connect_timeout_ms) onto HiveServer2Statement.ExecuteStatementAsync and ExecuteQueryAsyncInternal spans, not just the session-creation span.

Evidence

  • Traces.StatementTests.20260527_144246/AdbcDrivers.Databricks-trace-2026-05-27-21-45-30-448111-28640.log:10 — error span with no query_timeout_s tag
  • Same file, line 1 — CreateSessionRequest of a separate trace carries adbc.apache.statement.query_timeout_s = "5"
  • Across all 93 error spans in StatementTests archive: zero carry the timeout tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions