Billing metrics always contains `anon' user. #321
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#321
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Billing metrics
always contains
anon
instead of actual owner id.Expected Behavior
Metric contains actual owner ID.
Current Behavior
Metric contains
anon
for authenticated requests.Possible Solution
There are two possible solutions I see:
s3middleware.Metrics
afters3middleware.Auth
)But this leads to no counting requests that fail authentication and don't count authentication in result request duration.
ReqInfo
(s3middleware.Auth
must put proper owner id into it)Steps to Reproduce (for bugs)
Context
This metric is used to make billing, so we need to have properly owner id.
Regression
Yes. This #149 pr changed middlewares order.
Your Environment
391fc9cbe3
I don't like an idea of changing middleware order, so second option does look better. Let's do that.