foxcpp / foxcpp/maddy

Some of the Prometheus metrics seem to be unused

未關閉
#421 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
6.1k
分支
327
PR 合併指標
30 天內沒有已合併 PR

描述

Hi there, me again :).

I decided to set up Prometheus monitoring because I was hoping to get alerted when/if I stop receiving e-mails frequently (as that has usually shown to be a problem in the past).

I was quite confused by two points:

* the `maddy_*` prometheus metrics don't seem to appear in the `/metrics` output until they actually get incremented (maybe this is intentional? But as a Prometheus noob I would have liked to know on the documentation page before wondering if I missed something)
* some of the metrics seem to be unused — for example `completedSMTPTransactions` which doesn't seem to have a corresponding increment line

```
❯ rg completedSMTPTransactions
internal/endpoint/smtp/metrics.go
33: completedSMTPTransactions = prometheus.NewCounterVec(
83: prometheus.MustRegister(completedSMTPTransactions)
```

I can have a crack at these problems if you don't think I'm wrong.

I would also like to add some more metrics — for example on the number of e-mails that get successfully sent over LMTP (perhaps excluding ones received from local users ... hmm), so that I can have a very clear number of 'received e-mails' that actually make it to Dovecot rather than the queues getting deadlocked (which seems to have bitten me every few months on older versions).
Does that sound reasonable?

貢獻指南

開啟貢獻指南

研究方向

從 internal/endpoint/smtp/metrics.go 開始,接著在儲存庫中搜尋 completedSMTPTransactions 和其他 maddy_* 指標的使用情況。重現 issue 中所描述的 /metrics 行為,並判斷哪些指標實際上會被更新;當未使用指標的相關發現已獲得解決,且預期的指標可見性已記錄或驗證後,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
go, prometheus
領域
observability
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。