akka-persistence-cassandra icon indicating copy to clipboard operation
akka-persistence-cassandra copied to clipboard

Logging of slow queries

Open masterzen opened this issue 9 years ago • 9 comments

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 avatar Oct 29 '15 14:10 masterzen

@masterzen thanks for the PR, looks good to me except for the failing tests. Can you please take a look?

Cheers, Martin

krasserm avatar Oct 31 '15 04:10 krasserm

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.

masterzen avatar Oct 31 '15 10:10 masterzen

Great, thanks. Would you mind extending the README to document your contribution?

krasserm avatar Nov 01 '15 05:11 krasserm

@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.

patriknw avatar Dec 07 '15 16:12 patriknw

@masterzen can you update about the status of this ? looks a very promising feature.

sharma-rohit avatar Dec 16 '15 12:12 sharma-rohit

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).

masterzen avatar Dec 16 '15 12:12 masterzen

when completing this, please open PR at https://github.com/akka/akka-persistence-cassandra, which is the new home for akka-persistence-cassandra

patriknw avatar Jan 14 '16 15:01 patriknw

Thanks @patriknw , I'll do that as soon as I can find some time to finish the work.

masterzen avatar Jan 14 '16 15:01 masterzen

thanks, it's a nice feature

patriknw avatar Jan 14 '16 15:01 patriknw