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

Add membership queue metrics #276

Merged
merged 6 commits into from
Nov 12, 2020
Merged

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Nov 12, 2020

Fixes #259

This PR creates 3 new metrics entries for prometheus:

  • membershipqueue_pending(type) which will show which types of membership are waiting in the queue
  • membershipqueue_processed(type, outcome) will show the number of completed (success & failed) membership actions
  • membershipqueue_reason(type, errcode, http_status) will be a count of the failures for the actions
  • membershipqueue_lastage is the age of the last processed request, in MS

Output looks good:

# HELP bridge_membershipqueue_pending Count of membership actions in the queue by type
# TYPE bridge_membershipqueue_pending gauge
bridge_membershipqueue_pending{type="leave"} 0
bridge_membershipqueue_pending{type="kick"} 0
bridge_membershipqueue_pending{type="join"} 0

# HELP bridge_membershipqueue_processed Count of membership actions processed by type and outcome
# TYPE bridge_membershipqueue_processed counter
bridge_membershipqueue_processed{type="leave",outcome="success"} 6
bridge_membershipqueue_processed{type="kick",outcome="success"} 4
bridge_membershipqueue_processed{type="join",outcome="success"} 1

# HELP bridge_membershipqueue_reason Count of failures to process membership, by matrix errcode and http status
# TYPE bridge_membershipqueue_reason counter

# HELP bridge_membershipqueue_lastage Gauge to measure the age of the last processed event
# TYPE bridge_membershipqueue_lastage gauge
bridge_membershipqueue_lastage 0

@Half-Shot Half-Shot requested review from a team and jaller94 and removed request for a team November 12, 2020 12:15
Copy link
Contributor

@jaller94 jaller94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Half-Shot Half-Shot merged commit 4398e04 into develop Nov 12, 2020
@jaller94 jaller94 deleted the hs/add-membershipqueue-metrics branch November 13, 2020 18:59
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 this pull request may close these issues.

Membership queue should report metrics
2 participants