【问题标题】:Is it possible to marshal/unmarshal Prometheus state in go-client?是否可以在 go-client 中编组/解组 Prometheus 状态?
【发布时间】:2020-02-13 17:39:10
【问题描述】:

我希望能够将各种 Prometheus 指标(CounterVec、HistogramVec、...)的保存状态保存到我的应用程序中的文件中,并在必要时稍后恢复。这可能吗?

我看到有Write method in metric.go,但找不到Read

【问题讨论】:

标签: go prometheus


【解决方案1】:

没有 Prometheus 客户端库支持这个,你也不应该需要这个。客户端库设计为完全在内存中工作,rate() 等函数将优雅地处理由于进程重新启动而导致的计数器重置。

【讨论】:

    猜你喜欢
    • 2019-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-13
    • 1970-01-01
    • 1970-01-01
    • 2020-08-06
    • 2022-01-25
    相关资源
    最近更新 更多