Class Tm1SessionPoolMetrics

java.lang.Object
io.skipcheck.tm1.spring.boot.autoconfigure.Tm1SessionPoolMetrics
All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder

public final class Tm1SessionPoolMetrics extends Object implements io.micrometer.core.instrument.binder.MeterBinder
Metrics for a Tm1SessionPool, from its stats(): sessions held, evicted and closed, since every session counts against the TM1 server. Auto-configured when Micrometer is present; bind it yourself otherwise.
  • tm1.session.pool.held (gauge): sessions in the pool
  • tm1.session.pool.closing (gauge): evicted sessions in their grace period
  • tm1.session.pool.created (counter): sessions created
  • tm1.session.pool.evicted (counter, tagged reason: idle, age, size): sessions evicted
  • tm1.session.pool.closed (counter): sessions closed on TM1

Each meter also carries the tags given to the constructor. The auto-configured ones are tagged server with the pool's server name, default for tm1.*, so every pool's meters have the same tag keys and a query or a dashboard can group them by server.

  • Constructor Details

    • Tm1SessionPoolMetrics

      public Tm1SessionPoolMetrics(Tm1SessionPool pool)
      Metrics for pool.
      Parameters:
      pool - the pool to report on
    • Tm1SessionPoolMetrics

      public Tm1SessionPoolMetrics(Tm1SessionPool pool, Iterable<io.micrometer.core.instrument.Tag> tags)
      Metrics for pool, with tags on every meter, such as the server's name when there are several.
      Parameters:
      pool - the pool to report on
      tags - the tags to add
  • Method Details

    • bindTo

      public void bindTo(io.micrometer.core.instrument.MeterRegistry registry)
      Specified by:
      bindTo in interface io.micrometer.core.instrument.binder.MeterBinder