Skip to content

tracing(csharp): connection.client_protocol (string) vs connection.server_protocol_version (numeric) type inconsistency #486

@eric-wang-1990

Description

@eric-wang-1990

Severity: Low

Observation

Two protocol-version tags on the same span (HiveServer2Connection.OpenAsync) have inconsistent types:

  • connection.client_protocol = "SPARK_CLI_SERVICE_PROTOCOL_V7" (string)
  • connection.server_protocol_version = 7 (int)

Both refer to the same kind of value (Thrift protocol version). Inconsistent types break naive dashboards that try to group/filter by protocol version, and force consumers to handle both representations.

Suggested fix

Pick one representation:

  • Both string ("SPARK_CLI_SERVICE_PROTOCOL_V7"): better for readability
  • Both int (7): better for arithmetic / comparison
  • Or carry both forms with distinct tag names: connection.protocol.version_id = 7 + connection.protocol.version_name = "SPARK_CLI_SERVICE_PROTOCOL_V7" for both client and server

Related (separate low-priority finding)

db.response.status_code is also sometimes int 0 and sometimes string 'SUCCESS_STATUS'. Same fix pattern — pick one.

Evidence

  • All 33 archives — every OpenAsync span exhibits the type mismatch
  • Traces.StatementTests.20260527_144246/ — the int/string mix of db.response.status_code

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