Not possible to retrieve query string for PreparedStatements when used on Batch operations

Description

I've created opentracing instrumentation for cassandra-driver: https://github.com/nicholasamorim/opentracing-python-cassandra

All is looking good, but...

Tracing queries on BatchStatement is a bit of a challenge. While SimpleStatements is good, if you use a PreparedQuery then `_statement_and_parameters` will contain only the encoded bytes of the query.

I looked into the source and unfortunately when calling `batch.add` no reference of the original querystring seems to be accessible anywhere.

Alan Boudrealt suggested to create a ticket so that perhaps this could be revisited in the future.

Environment

None

Pull Requests

None

Assignee

Unassigned

Reporter

Nicholas Amorim

Fix versions

None

Labels

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Priority

Minor