cloudwego / shmipc-go

A high performance inter-process communication golang library developed by CloudWeGo
Apache License 2.0
400 stars 29 forks source link

Support for sending metrics to Prometheus #16

Open liu-song opened 1 year ago

liu-song commented 1 year ago

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 1 year ago

assign

GuangmingLuo commented 11 months ago

Thanks for your idea and PR contribution @liu-song . However, we won't proceed this until there is a specific user claim that they will use this feature in real scenario.