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

Logging of slow queries #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

masterzen
Copy link

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.

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 query takes more than 2 seconds it will be
logged at the DEBUG level to the "com.datastax.driver.core.QueryLogger.SLOW"
slf4j logger.
@krasserm
Copy link
Owner

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

Cheers,
Martin

@masterzen
Copy link
Author

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.

@krasserm
Copy link
Owner

krasserm commented Nov 1, 2015

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

@patriknw
Copy link
Collaborator

patriknw commented Dec 7, 2015

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

@sharma-rohit
Copy link

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

@masterzen
Copy link
Author

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

@patriknw
Copy link
Collaborator

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

@masterzen
Copy link
Author

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

@patriknw
Copy link
Collaborator

thanks, it's a nice feature

rafalsiwiec pushed a commit to rafalsiwiec/akka-persistence-cassandra that referenced this pull request Nov 17, 2016
* Both Scala and Java API
* It's a merge of previous CassandraSession in this project
  and the additional functionality that Lagom's CassandraSession
  provided. Lagom will use this one (delegate to it).
* make ListenableFutureConverter public
rafalsiwiec pushed a commit to rafalsiwiec/akka-persistence-cassandra that referenced this pull request Nov 17, 2016
…triknw

Include public API for CassandraSession, krasserm#111
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

Successfully merging this pull request may close these issues.

4 participants