cassandra-diagnostics
                                
                                 cassandra-diagnostics copied to clipboard
                                
                                    cassandra-diagnostics copied to clipboard
                            
                            
                            
                        Slow Query Module - statement not logged
vagrant@192:~$ curl localhost:8998/version 1.4.10
cassandra-diagnostics.yml:
global:
  systemName: "smartcat-cassandra-cluster"
reporters:
  - reporter: io.smartcat.cassandra.diagnostics.reporter.LogReporter
modules:
  - module: io.smartcat.cassandra.diagnostics.module.heartbeat.HeartbeatModule
    measurement: heartbeat
    options:
      period: 15
      timeunit: MINUTES
    reporters:
      - io.smartcat.cassandra.diagnostics.reporter.LogReporter
  - module: io.smartcat.cassandra.diagnostics.module.slowquery.SlowQueryModule
    measurement: slow_query #optional
    options:
      slowQueryThresholdInMilliseconds: 20 #optional
      slowQueryReportEnabled: true #optional
      slowQueryCountReportEnabled: true #optional
      slowQueryCountReportPeriod: 30 #optional
      slowQueryCountReportTimeunit: SECONDS #optional
      queryTypesToLog: # optional
        - ALL
Line in the log:
INFO  [cassandra-diagnostics-connector-0] 2017-12-25 16:04:18,965 LogReporter.java:37 - SIMPLE Measurement SLOW_QUERY [time=1514217853219, value=5746.0, tags={host=192.168.34, systemName=smartcat-cassandra-cluster, statementType=SELECT}, fields={statement=, client=/192.168.34.21:49894, consistencyLevel=QUORUM}]
Note that statement= field is empty. I would expect statement to provide the actual slow query statement.
got same issue. any update regarding this ?
The actual mechanism for populating statement field with the respective CQL statement is not fully implemented and it is expected to be completed in upcoming releases. Because of performance impact the cassandra-diagnostics Java agent might have on the cassandra node JVM process, this feature will be probably turned off by default.