Interface MicrometerMetricsExporter.MeterRegistry
- Enclosing class:
MicrometerMetricsExporter
public static interface MicrometerMetricsExporter.MeterRegistry
Meter registry abstraction to avoid compile-time Micrometer dependency
指标注册表抽象,避免编译时 Micrometer 依赖
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescription<T> voidcounter(String name, String[] tags, T obj, ToLongFunction<T> function) Register a function counter 注册函数计数器<T> voidgauge(String name, String[] tags, T obj, ToDoubleFunction<T> function) Register a gauge 注册仪表voidRemove meters by name prefix 按名称前缀移除指标<T> voidtimer(String name, String[] tags, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalFunction) Register a function timer 注册函数定时器Wrap actual Micrometer MeterRegistry using reflection 使用反射包装实际的 Micrometer MeterRegistry
-
Method Details
-
gauge
Register a gauge 注册仪表- Type Parameters:
T- object type | 对象类型- Parameters:
name- metric name | 指标名称tags- tags | 标签obj- target object | 目标对象function- value function | 值函数
-
counter
Register a function counter 注册函数计数器- Type Parameters:
T- object type | 对象类型- Parameters:
name- metric name | 指标名称tags- tags | 标签obj- target object | 目标对象function- value function | 值函数
-
timer
<T> void timer(String name, String[] tags, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalFunction) Register a function timer 注册函数定时器- Type Parameters:
T- object type | 对象类型- Parameters:
name- metric name | 指标名称tags- tags | 标签obj- target object | 目标对象countFunction- count function | 计数函数totalFunction- total time function (nanos) | 总时间函数(纳秒)
-
remove
Remove meters by name prefix 按名称前缀移除指标- Parameters:
namePrefix- name prefix | 名称前缀
-
wrap
Wrap actual Micrometer MeterRegistry using reflection 使用反射包装实际的 Micrometer MeterRegistry- Parameters:
meterRegistry- actual Micrometer registry | 实际的 Micrometer 注册表- Returns:
- wrapped registry | 包装的注册表
-