rgw: expose useful x-amz headers beyond request-id
rgw has some semi-internal data that would be very useful to expose to help debugging & metrics. Much of this is already exposed by AWS S3, but not RGW. This is very useful for reverse proxies like HAProxy that can easily capture headers, but not as easily access the body.
AWS S3 example:
x-amz-bucket-region: us-east-1 x-amz-request-id: 743DA9690F8D905A x-amz-id-2: DNw88j6UOB5ufRSoCXrS/ZxZy4vsLIXMxgTiTStk5vh+JNquPb1iyFVXSeANI4B8McWa6n+ARC8= x-amz-bucket: mybucketname x-amz-error-code: NoSuchKey x-amz-error-message: The specified key does not exist. x-amz-error-detail-Key: mypage.html
The only part implemented so far by Ceph is
x-amz-request-id. This is a pretty obscure part of AWS S3. It's not in the API docs at all, but is seen on the web (hard to google for) [[https://stackoverflow.com/questions/19037664/how-do-i-have-an-s3-bucket-return-404-instead-of-403-for-a-key-that-does-not-e ]]
RGW has some placeholders for the
x-amz-error parts, written as part of the s3website work by robbat2. x-amz-id-2 is HostID in Error messages, but also needs to be in more general headers.
1. Always expose request-id, id-2, region, bucket headers.
2. On error, expose error-* headers.