joao-r-reis commented on code in PR #1941:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1941#discussion_r3102027896
##########
query_executor.go:
##########
@@ -383,17 +383,19 @@ func (q *internalQuery) attempt(keyspace string, end,
start time.Time, iter *Ite
if q.qryOpts.observer != nil {
metricsForHost := q.hostMetricsManager.attempt(latency, host)
q.qryOpts.observer.ObserveQuery(q.qryOpts.context,
ObservedQuery{
- Keyspace: keyspace,
- Statement: q.qryOpts.stmt,
- Values: q.qryOpts.values,
- Start: start,
- End: end,
- Rows: iter.numRows,
- Host: host,
- Metrics: metricsForHost,
- Err: iter.err,
- Attempt: attempt,
- Query: q.originalQuery,
+ Keyspace: keyspace,
+ Statement: q.qryOpts.stmt,
+ StatementKeyspace: q.routingInfo.getKeyspace(),
Review Comment:
Hmm I don't think we should be adding CQL parsing for something like this,
most if not all drivers avoid doing any kind of CQL parsing. What some drivers
do is expose a statement builder / mapper API that will create statements and
internally set fields so the driver is aware of some metadata like keyspace,
table, idempotency without having to parse it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]