1

I have a requirement to monitor and evaluate based on cql logs.

I have tried to set show.sql/show_sql and show.cql/show_cql in persistence.xml but nothing seems to help.

Yeshvanthni
  • 207
  • 2
  • 15

2 Answers2

3

Not sure that Kundera exposes this. You can try Achilles, it does expose all CQL statements, even prepared statements, with bound values:

Simple query : [SELECT id,count,name,value FROM clustered WHERE id=8013513484507194368 ORDER BY count ASC LIMIT 3;] with CONSISTENCY LEVEL [ONE] 
Prepared statement : [INSERT INTO clustered(id,count,name,value) VALUES (?,?,?,?);] with CONSISTENCY LEVEL [ONE] 
     bound values: [4369116603855882908, 583011159, name, clustered_value] 
Prepared statement : [UPDATE clustered SET value=? WHERE id=? AND count=? AND name=?;] with CONSISTENCY LEVEL [ONE] 
     bound values: [new_clustered_value, 4945333445409206272, 1627329099, name]

Disclaimer: I'm the creator of Achilles

doanduyhai
  • 8,712
  • 27
  • 26
2

Use this property in your persistence.xml

<property name="kundera.show.query" value="true" />
Dolzhenok
  • 78
  • 6