Class CassandraClientSampler


  • public abstract class CassandraClientSampler
    extends java.lang.Object
    Decides whether to start a new trace based on the cassandra statement.

    Ex. Here's a sampler that only starts traces for bound statements

    {@code
     cassandraClientTracingBuilder.serverSampler(new CassandraClientSampler() {
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.lang.Boolean trySample​(com.datastax.driver.core.Statement statement)
      Returns an overriding sampling decision for a new trace.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TRACE_ID

        public static final CassandraClientSampler TRACE_ID
        Ignores the request and uses the trace ID instead.
      • NEVER_SAMPLE

        public static final CassandraClientSampler NEVER_SAMPLE
        Returns false to never start new traces for cassandra client requests.
    • Constructor Detail

      • CassandraClientSampler

        public CassandraClientSampler()
    • Method Detail

      • trySample

        @Nullable
        public abstract java.lang.Boolean trySample​(com.datastax.driver.core.Statement statement)
        Returns an overriding sampling decision for a new trace. Return null ignore the statement and use the trace ID sampler.