Tejas Lodaya created CASSGO-138:
-----------------------------------

             Summary: Add Go execution tracing for client-side query latency 
attribution
                 Key: CASSGO-138
                 URL: https://issues.apache.org/jira/browse/CASSGO-138
             Project: Apache Cassandra Go driver
          Issue Type: Improvement
            Reporter: Tejas Lodaya
            Assignee: Tejas Lodaya


Client-observed query latency includes work inside the driver that Cassandra’s 
server-side tracing cannot explain, such as connection selection, statement 
preparation, frame serialization, write queuing, and retry backoff.

Add runtime/trace instrumentation so applications can inspect these phases 
using go tool trace and associate query execution with their existing trace 
task contexts.

Proposed changes:
- Add regions for query attempts, connection selection, preparation, stream 
allocation, frame building, write queuing and flushing, response waiting, 
reader processing, and retry/backoff.
- Log prepared statement cache hits/misses and retry decisions.
- Add RetryType.String() for readable retry decisions.
- Document task association and the limitations of shared reader and flusher 
goroutines.

Use fixed event names without recording CQL statements or bound values. 
Preserve existing query execution, timeout, retry, and connection pool behavior.

Validation:
- Exercise query, retry, timeout, cancellation, and write-coalescing paths with 
tracing enabled.
- Confirm emitted events can be inspected with go tool trace.
- Measure overhead with tracing disabled and enabled, including allocations.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to