Skip to content

Add 'VStreamerCount' metric to vttablet#32

Merged
timvaillancourt merged 7 commits intoslack-vitess-r13.0.3from
vstream-count-metric
Dec 16, 2022
Merged

Add 'VStreamerCount' metric to vttablet#32
timvaillancourt merged 7 commits intoslack-vitess-r13.0.3from
vstream-count-metric

Conversation

@timvaillancourt
Copy link
Copy Markdown

@timvaillancourt timvaillancourt commented Dec 13, 2022

Description

This PR adds the VStreamersActive VStreamerCount stats metric to vttablet so that the number of active streams is observable. Using the already-existing VStreamersCreated metric alone doesn't provide an accurate view of the number of streams running on a tablet because they could have ended

A simple len(vse.streamers) is used to detect number of active streamers, as this map has entries for active streams only

Upon successful testing I plan to submit this change upstream

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

@timvaillancourt timvaillancourt marked this pull request as ready for review December 14, 2022 11:53
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@tanjinx tanjinx added the v13 label Dec 15, 2022
@timvaillancourt timvaillancourt changed the title Add 'VStreamersActive' metric to vttablet Add 'VStreamerCount' metric to vttablet Dec 15, 2022
@timvaillancourt
Copy link
Copy Markdown
Author

Adding suggestions from upstream PR vitessio#11978

@timvaillancourt timvaillancourt merged commit b17a948 into slack-vitess-r13.0.3 Dec 16, 2022
@timvaillancourt timvaillancourt deleted the vstream-count-metric branch December 16, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants