Class MicrometerSnowflakeMetrics

java.lang.Object
com.fayupable.snowflake.jpaspring.MicrometerSnowflakeMetrics
All Implemented Interfaces:
SnowflakeMetrics

public class MicrometerSnowflakeMetrics extends Object implements SnowflakeMetrics
Publishes generator activity as Micrometer counters, so it shows up in whatever backend the application already has configured (Prometheus, Grafana, or nothing at all if no registry is wired).
  • Constructor Details

    • MicrometerSnowflakeMetrics

      public MicrometerSnowflakeMetrics(io.micrometer.core.instrument.MeterRegistry registry)
  • Method Details

    • recordIdGenerated

      public void recordIdGenerated()
      Description copied from interface: SnowflakeMetrics
      Called every time nextId() successfully produces an id.
      Specified by:
      recordIdGenerated in interface SnowflakeMetrics
    • recordSpinWait

      public void recordSpinWait()
      Description copied from interface: SnowflakeMetrics
      Called every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.
      Specified by:
      recordSpinWait in interface SnowflakeMetrics