Skip to content

Commit

Permalink
Merge pull request #800 from ivantopo/issue-799/match-error-with-cass…
Browse files Browse the repository at this point in the history
…andra-driver

remove unnecessary match on Cassandra instrumentation, fixes #799
  • Loading branch information
ivantopo authored Jul 7, 2020
2 parents 9ba6d03 + 2ef019d commit 60bcb63
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,13 @@ class InstrumentedSession(underlying: Session) extends AbstractSession {
new FutureCallback[ResultSet] {
override def onSuccess(result: ResultSet): Unit = {
recordClientQueryExecutionInfo(clientSpan, result)
result.getExecutionInfo.getStatement match {
case b: BoundStatement =>
b.preparedStatement.getQueryString
case r: RegularStatement =>
r.getQueryString
}
clientSpan.finish()
}

override def onFailure(cause: Throwable): Unit = {
clientSpan.fail(cause.getMessage, cause)
clientSpan.finish()
clientSpan
.fail(cause.getMessage, cause)
.finish()
}
},
MoreExecutors.directExecutor()
Expand Down

0 comments on commit 60bcb63

Please sign in to comment.