akka-persistence-cassandra
akka-persistence-cassandra copied to clipboard
Logging of slow queries
For troubleshooting, it is possible to log queries that takes more than a certain amount of time with:
cassandra-journal.log-slow-query = true
cassandra-journal.slow-query-time = 2s
Then if one of the journal or snapshot query takes more than 2 seconds it will be logged at the DEBUG level to the "com.datastax.driver.core.QueryLogger.SLOW" slf4j logger.
@masterzen thanks for the PR, looks good to me except for the failing tests. Can you please take a look?
Cheers, Martin
It was on my Todo list, I was just waiting to see if there would be an interest in the feature. Also, it doesn't seem to fail as much on my laptop, so I need to figure out what is the problem :) I'll amend the PR once the failing tests will be fixed.
Great, thanks. Would you mind extending the README to document your contribution?
@masterzen looks like a nice feature. What is the status? I think it will be difficult to migrate the test to the cassandra-3x branch, but I guess we can live without the test there.
@masterzen can you update about the status of this ? looks a very promising feature.
This code is working in production on our systems, but I lack the time to properly finish this PR. I hope to have a bit more time next week, in which case I'll amend those commits with a working test (I assume the test are failing as a side effect of enabling logging, so I need to separate the slow log test on his own class).
when completing this, please open PR at https://github.com/akka/akka-persistence-cassandra, which is the new home for akka-persistence-cassandra
Thanks @patriknw , I'll do that as soon as I can find some time to finish the work.
thanks, it's a nice feature