You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emit a metric, available in Prometheus, like vttablet_tablet_type metric to indicate if that tablet target type is currently primary, replica, etc. Alternately include tablet type in existing status metrics like vttablet_tablet_state.
Use Case(s)
Use case is to detect when the primary is not in serving state. We have vttablet_tablet_state metric for that, but it does not include the tablet type.
The vttablet_tablet_type_count metric doesn't tell us what the current target type of the tablet is, so it doesn't help very much with this use case. The TabletType stat does have what we want, but it is not exported to Prometheus.
Metrics recently added by @rafer can very nearly be used to satisfy this use case: #13521. However, those metrics are not updated when there are no queries, nor in the case of FailedPrecondition errors like wrong tablet type:
maxenglander
changed the title
Feature Request: emit target type metric from vttablet
Feature Request: emit target type metric from vttablet to Prometheus
Oct 18, 2023
maxenglander
changed the title
Feature Request: emit target type metric from vttablet to Prometheus
Feature Request: emit tablet type metric from vttablet to Prometheus
Oct 18, 2023
Feature Description
Emit a metric, available in Prometheus, like
vttablet_tablet_type
metric to indicate if that tablet target type is currently primary, replica, etc. Alternately include tablet type in existing status metrics likevttablet_tablet_state
.Use Case(s)
Use case is to detect when the primary is not in serving state. We have
vttablet_tablet_state
metric for that, but it does not include the tablet type.The
vttablet_tablet_type_count
metric doesn't tell us what the current target type of the tablet is, so it doesn't help very much with this use case. TheTabletType
stat does have what we want, but it is not exported to Prometheus.Metrics recently added by @rafer can very nearly be used to satisfy this use case: #13521. However, those metrics are not updated when there are no queries, nor in the case of
FailedPrecondition
errors likewrong tablet type
:vitess/go/vt/vttablet/tabletserver/state_manager.go
Lines 386 to 400 in a5e819d
The text was updated successfully, but these errors were encountered: