wal-g
wal-g copied to clipboard
Feature request: add statsd walg_s3_upload_time metric
Database name
PostgreSQL
Issue description
Describe your problem
It would be useful to monitor s3 upload latency. Currently I'm doing it using a bash wrapper on wal-push command, it would be cool if wal-g could produce this metric itself
Could you please define 'upload latency'? Is it roundtrip to storage (S3)?
A time of WAL upload to S3 storage. According to our research, different S3-compatible storages have very different upload time differing from 1 second to 10 seconds. Also storages can lag sometimes and give high WAL concurrency on uploading server. I want to see this timers in metrics. Currently I use a bash script instead of wal-push like this one:
start=`date +%s%3N`
wal-push ... # parameters here
end=`date +%s%3N`
current_dt="`date +'%Y/%m/%d %H:%M:%S.%6N'`"
echo "INFO: ${current_dt} WAL PUSH TIME: $(($end - $start)) ms"
# metrics are uploaded manualy to prometheus here