-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add "type" to membership queue metrics #300
Conversation
@@ -103,7 +103,7 @@ export class MembershipCache { | |||
return Object.keys(this.membershipMap[roomId]); | |||
} | |||
const members = []; | |||
for (const [userId, [membership, profile]] of Object.entries(this.membershipMap[roomId])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random linter error I spotted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this an error?
The value of profile
isn't used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, warning. The linter wasn't happy that profile wasn't used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also read this the commit wrong way, thinking that profile
got added.
Nevermind. 🙈
@@ -103,7 +103,7 @@ export class MembershipCache { | |||
return Object.keys(this.membershipMap[roomId]); | |||
} | |||
const members = []; | |||
for (const [userId, [membership, profile]] of Object.entries(this.membershipMap[roomId])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this an error?
The value of profile
isn't used.
changelog.d/300.bugfix
Outdated
@@ -0,0 +1 @@ | |||
Fix a bug that would cause membership queue failures to not be reported as metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I don't understand what this means. Why are failures reported "as metrics"? Do you mean "as part of the metrics"?
- I also don't understand how adding the label "type" fixes some failures not being reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update about 2): After having read the issue I found the code where "type" is being used as a label later.
I now understand that this is about handing over all labels on the initial sync of metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorta. Prom-client will get angry if you use a label not defined in the schema. This PR just ensures we define it. Have updated the changelog entry to make it a bit easier to see the bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying the change in the news file.
Fixes #297