Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringIndexOutOfBoundsException at kamon.instrumentation.cassandra.driver.InstrumentedSession.extractStatementType #1058

Closed
sshtel opened this issue Oct 5, 2021 · 1 comment

Comments

@sshtel
Copy link

sshtel commented Oct 5, 2021

Kamon bundle version to v2.1.12
Lagom library version: 1.6.5
Akka version: Akka 2.6.14 (https://github.com/lagom/lagom/releases/tag/1.6.5)

Cassandra instrument is running with Lagom.
And this error log is blocking the application.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)
	at kamon.instrumentation.cassandra.driver.InstrumentedSession.extractStatementType(InstrumentedSession.scala:163)
	at kamon.instrumentation.cassandra.driver.InstrumentedSession.buildClientSpan(InstrumentedSession.scala:62)
	at kamon.instrumentation.cassandra.driver.InstrumentedSession.executeAsync(InstrumentedSession.scala:77)
	at akka.persistence.cassandra.session.scaladsl.CassandraSession.$anonfun$executeWrite$1(CassandraSession.scala:262)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49)
	at kamon.instrumentation.executor.ExecutorInstrumentation$InstrumentedThreadPool$TimingRunnable.run(ExecutorInstrumentation.scala:453)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)```
@ivantopo
Copy link
Contributor

ivantopo commented Oct 5, 2021

Hey @sshtel, thanks for bringing this up. A fix is in already, and will be released with Kamon 2.3.0. There are a few major changes going on there we hope we will be able to release it later this week 🙏

Stay tuned for the release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants