Merge pull request #2118 from versity/ben/bucket-tags

feat: add bucket metrics tag when request specifies a bucket
This commit is contained in:
Ben McClelland
2026-05-08 08:12:53 -07:00
committed by GitHub

View File

@@ -131,6 +131,12 @@ func (m *manager) Send(ctx *fiber.Ctx, err error, action string, count int64, st
{Key: "action", Value: a.Name},
}
// add tag bucket=<bucketname> if the request specifies a bucket
bucket := ctx.Params("bucket")
if bucket != "" {
reqTags = append(reqTags, Tag{Key: "bucket", Value: bucket})
}
reqStatus := status
if err != nil {