Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions go/vt/vttablet/tabletserver/vstreamer/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type Engine struct {
rowStreamerNumRows *stats.Counter
rowStreamerNumPackets *stats.Counter
errorCounts *stats.CountersWithSingleLabel
vstreamersActive *stats.GaugeFunc
vstreamersCreated *stats.Counter
vstreamersEndedWithErrors *stats.Counter

Expand Down Expand Up @@ -126,6 +127,8 @@ func NewEngine(env tabletenv.Env, ts srvtopo.Server, se *schema.Engine, lagThrot
vstreamersEndedWithErrors: env.Exporter().NewCounter("VStreamersEndedWithErrors", "Count of vstreamers that ended with errors"),
errorCounts: env.Exporter().NewCountersWithSingleLabel("VStreamerErrors", "Tracks errors in vstreamer", "type", "Catchup", "Copy", "Send", "TablePlan"),
}
vse.vstreamersActive = env.Exporter().NewGaugeFunc("VStreamersActive", "Count of vstreamers active", vse.getStreamersActive)

env.Exporter().HandleFunc("/debug/tablet_vschema", vse.ServeHTTP)
return vse
}
Expand Down Expand Up @@ -375,6 +378,10 @@ func (vse *Engine) setWatch() {
})
}

func (vse *Engine) getStreamersActive() int64 {
return int64(len(vse.streamers))
}

func getPacketSize() int64 {
return int64(*defaultPacketSize)
}