wal-g icon indicating copy to clipboard operation
wal-g copied to clipboard

Feature request: add statsd walg_s3_upload_time metric

Open M1ha-Shvn opened this issue 1 year ago • 2 comments

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

M1ha-Shvn avatar Oct 10 '24 08:10 M1ha-Shvn

Could you please define 'upload latency'? Is it roundtrip to storage (S3)?

ostinru avatar Oct 12 '24 19:10 ostinru

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

M1ha-Shvn avatar Oct 14 '24 08:10 M1ha-Shvn