[PR #13] [CLOSED] Production-readiness modifications #60

Closed
opened 2026-02-26 18:33:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/decke/smtprelay/pull/13
Author: @dannykopping
Created: 3/9/2021
Status: Closed

Base: masterHead: upsteam-changes


📝 Commits (10+)

  • 150b377 Allow reading remotePass from env var
  • 546ce12 Merge pull request #1 from grafana/remote_pass
  • 7583cfd Add support for any network + improve logs & errors
  • 4ca35c1 Merge pull request #4 from grafana/logs_and_net_check
  • 7cf65e6 Adding attempt and failure metrics
  • df12d96 Adding duration metric
  • ac8d53e Making metrics address configurable
  • d204de6 Merge pull request #9 from grafana/dannykopping/metrics
  • 53212b6 Moving metrics_listen config option into more appropriate position
  • 04e7486 Refactoring, adding structured logging

📊 Changes

7 files changed (+746 additions, -89 deletions)

View changed files

📝 config.go (+38 -16)
📝 go.mod (+3 -0)
📝 go.sum (+410 -0)
logger.go (+40 -0)
📝 main.go (+202 -72)
metrics.go (+45 -0)
📝 smtprelay.ini (+8 -1)

📄 Description

Hey @decke!

We've been using your great library here at Grafana, and we needed to make some modifications to productionize the service a bit. To this end, we've added:

  • structured logging
  • metrics exposition with Prometheus (RED metrics)
  • cloud-native changes (like logging to stdout by default)
  • signals handling
  • ...etc

These changes are very opinionated, so feel free to accept only the pieces you want (or indeed nothing at all).

Thanks for the super useful library!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/decke/smtprelay/pull/13 **Author:** [@dannykopping](https://github.com/dannykopping) **Created:** 3/9/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `upsteam-changes` --- ### 📝 Commits (10+) - [`150b377`](https://github.com/decke/smtprelay/commit/150b37778b2361a52d954f52d8e2f4dfeeedb038) Allow reading remotePass from env var - [`546ce12`](https://github.com/decke/smtprelay/commit/546ce1202fb7b4d83a09612f3e93558ba1a1ed37) Merge pull request #1 from grafana/remote_pass - [`7583cfd`](https://github.com/decke/smtprelay/commit/7583cfdd350762f3b1cf3fb0e26155e66874a757) Add support for any network + improve logs & errors - [`4ca35c1`](https://github.com/decke/smtprelay/commit/4ca35c10b60612fd4792f746f54354d6ccef10d8) Merge pull request #4 from grafana/logs_and_net_check - [`7cf65e6`](https://github.com/decke/smtprelay/commit/7cf65e61f936188b82925b688813144e171fa1c2) Adding attempt and failure metrics - [`df12d96`](https://github.com/decke/smtprelay/commit/df12d968ca6f78355e56de1a26e1c1d675c28b91) Adding duration metric - [`ac8d53e`](https://github.com/decke/smtprelay/commit/ac8d53ebde3a325ce2a60dd918e9611ae5764a3c) Making metrics address configurable - [`d204de6`](https://github.com/decke/smtprelay/commit/d204de6e6d0428082857d5d6b5577f2ef434c8e4) Merge pull request #9 from grafana/dannykopping/metrics - [`53212b6`](https://github.com/decke/smtprelay/commit/53212b6fe398dcabd285c9c15a03b06be86cab1d) Moving metrics_listen config option into more appropriate position - [`04e7486`](https://github.com/decke/smtprelay/commit/04e7486d4756e289685f38437f4a6c894cc053fb) Refactoring, adding structured logging ### 📊 Changes **7 files changed** (+746 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `config.go` (+38 -16) 📝 `go.mod` (+3 -0) 📝 `go.sum` (+410 -0) ➕ `logger.go` (+40 -0) 📝 `main.go` (+202 -72) ➕ `metrics.go` (+45 -0) 📝 `smtprelay.ini` (+8 -1) </details> ### 📄 Description Hey @decke! We've been using your great library here at Grafana, and we needed to make some modifications to productionize the service a bit. To this end, we've added: - structured logging - metrics exposition with Prometheus ([RED](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services/) metrics) - cloud-native changes (like logging to `stdout` by default) - signals handling - ...etc These changes are very opinionated, so feel free to accept only the pieces you want (or indeed nothing at all). Thanks for the super useful library! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 18:33:12 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/smtprelay#60
No description provided.