messagebird / pushprom

Pushprom is a proxy to the Prometheus Go client.
https://www.messagebird.com
BSD 2-Clause "Simplified" License
80 stars 13 forks source link

OBSV-443 fix gracefull servers shutdown and verbosity #33

Closed sshilko closed 1 year ago

sshilko commented 1 year ago

Removed debug UDP logging Separated messages into STDOUT and STDERR using standard logger Fixed gracefull shutdown for UDP & HTTP listeners

~/projects/pushprom (obsv-443 ✔) make native
go clean
go mod download
CGO_ENABLED=0 go build -ldflags "-s -w" -o "bin/pushprom-native" github.com/messagebird/pushprom
file bin/pushprom-native
bin/pushprom-native: Mach-O 64-bit executable arm64
~/projects/pushprom (obsv-443 ✔) ./bin/pushprom-native
2022/12/05 15:18:19 welcome to messagebird/pushprom
2022/12/05 15:18:19 starting listeners
2022/12/05 15:18:19 listening for stats UDP on port 0.0.0.0:9090
2022/12/05 15:18:19 exposing metrics on http://0.0.0.0:9091/metrics
2022/12/05 15:18:19 listening for stats on http://0.0.0.0:9091
2022/12/05 15:18:28 received SIGTERM, will terminate
2022/12/05 15:18:28 waiting for all servers to gracefully terminate
2022/12/05 15:18:28 shutting down http listener on 0.0.0.0:9091
2022/12/05 15:18:28 http listener is now offline
2022/12/05 15:18:29 shutting down udp listener on 0.0.0.0:9090
2022/12/05 15:18:29 closing incoming UDP port 0.0.0.0:9090
2022/12/05 15:18:29 udp listener is now offline
2022/12/05 15:18:30 all goroutines gracefully finished
~/projects/pushprom (obsv-443 ✔)