Skip to content

Monitoring

Kim Eunho edited this page Mar 3, 2014 · 5 revisions

Astyanax has 2 main sources of monitoring

Operation metrics

These include

  1. Basic timers for timing operations and record latency
  2. Counters for tracking success and error operations.

Connection pool metrics

These include some basic counters like

  1. Connections borrowed
  2. Connections closed
  3. Connection errors
  4. Active C* nodes
  5. No of connections to each C* node
  6. etc

These 2 sets of monitoring metrics are encapsulated in interfaces

  1. ConnectionPoolMonitor
  2. KeyspaceTracerFactory

How to use

Astyanax requires users to plug in their own implementations for these 2 interfaces and plug them in during the init phase with AstyanaxContext.

        public Builder withTracerFactory(KeyspaceTracerFactory tracerFactory) {
            this.tracerFactory = tracerFactory;
            return this;
        }

        public Builder withConnectionPoolMonitor(ConnectionPoolMonitor monitor) {
            this.monitor = monitor;
            return this;
        }

Note that both these implementations must be thread safe.

Clone this wiki locally