Class MicrometerSnowflakeMetrics
java.lang.Object
com.fayupable.snowflake.jpaspring.MicrometerSnowflakeMetrics
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionMicrometerSnowflakeMetrics(io.micrometer.core.instrument.MeterRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled every timenextId()successfully produces an id.voidCalled every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.
-
Constructor Details
-
MicrometerSnowflakeMetrics
public MicrometerSnowflakeMetrics(io.micrometer.core.instrument.MeterRegistry registry)
-
-
Method Details
-
recordIdGenerated
public void recordIdGenerated()Description copied from interface:SnowflakeMetricsCalled every timenextId()successfully produces an id.- Specified by:
recordIdGeneratedin interfaceSnowflakeMetrics
-
recordSpinWait
public void recordSpinWait()Description copied from interface:SnowflakeMetricsCalled every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.- Specified by:
recordSpinWaitin interfaceSnowflakeMetrics
-