foxcpp / foxcpp/maddy

Some of the Prometheus metrics seem to be unused

Aberta
#421 3 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Go
Estrelas
6.1k
Forks
327
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece em internal/endpoint/smtp/metrics.go e, em seguida, pesquise no repositório pelos usos de completedSMTPTransactions e das outras métricas maddy_*. Reproduza o comportamento de /metrics descrito na issue e determine quais métricas são realmente atualizadas; considera-se concluído quando as descobertas sobre métricas não utilizadas forem resolvidas e a visibilidade pretendida das métricas estiver documentada ou verificada.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
go, prometheus
Domínio
observability
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.