Support for sending metrics to Prometheus
liu-song opened this issue · 2 comments
liu-song commented
Is your feature request related to a problem? Please describe.
目前Monitor 接口没有具体实现,无法获得程序运行时的监控指标
Describe the solution you'd like
type Monitor interface {
OnEmitSessionMetrics(PerformanceMetrics, StabilityMetrics, ShareMemoryMetrics, *Session)
Flush() error
}
实现 Monitor 接口,其中OnEmitSessionMetrics 方法发送metrics 到prometheus , Flush() 方法将metrics写到本地日志文件
Describe alternatives you've considered
不太确定用那种实现方式
1 在业务代码里面实现Monitor 接口,然后提供一个使用的example,放在example路径中
2 直接在shmipc-go 库里实现,对外提供接口的实现,写一个使用的example
Additional context
liu-song commented
assign