Skip to content

Support for sending metrics to Prometheus #16

@songoow

Description

@songoow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-proposalA proposal of some kind, and a request for comments.state: pending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions