Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limit.overrideKey is computed incorrectly #7879

Closed
aarongable opened this issue Dec 10, 2024 · 1 comment · Fixed by #7902
Closed

limit.overrideKey is computed incorrectly #7879

aarongable opened this issue Dec 10, 2024 · 1 comment · Fixed by #7902
Assignees

Comments

@aarongable
Copy link
Contributor

When parsing limit overrides, we first create a pointer to a limit{} struct:

limit := &v.limit

then, for each override ID, we set that limit's overrideKey field:
limit.overrideKey = joinWithColon(name.EnumString(), id)

then save the pointer to this limit into a map:
parsed[joinWithColon(name.EnumString(), id)] = limit

If a limit has 5 override IDs, the "overrideKey" field of that singular limit struct will get overwritten 4 times, resulting in only the last value actually being preserved in the limit struct. This will throw off metrics about override utilitzation:

l.overrideUsageGauge.WithLabelValues(txn.limit.name.String(), txn.limit.overrideKey).Set(utilization)

@beautifulentropy
Copy link
Member

In an offline discussion we decided to remove this an other metrics that we we're not finding useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants