join pipelines_total.

This commit is contained in:
Miroslav Šedivý 2022-06-19 00:51:17 +02:00
parent ef7e9b1a53
commit 5ab4848580
4 changed files with 47 additions and 21 deletions

View file

@ -50,23 +50,26 @@ func streamSinkNew(codec codec.RTPCodec, pipelineStr func() string, video_id str
// metrics
currentListeners: promauto.NewGauge(prometheus.GaugeOpts{
Name: "listeners",
Name: "streamsink_listeners",
Namespace: "neko",
Subsystem: "capture_streamsink",
Subsystem: "capture",
Help: "Current number of listeners for a pipeline.",
ConstLabels: map[string]string{
"video_id": video_id,
"codec": codec.Name,
"video_id": video_id,
"codec_name": codec.Name,
"codec_type": codec.Type.String(),
},
}),
pipelinesCounter: promauto.NewCounter(prometheus.CounterOpts{
Name: "pipelines_total",
Namespace: "neko",
Subsystem: "capture_streamsink",
Subsystem: "capture",
Help: "Total number of created pipelines.",
ConstLabels: map[string]string{
"video_id": video_id,
"codec": codec.Name,
"submodule": "streamsink",
"video_id": video_id,
"codec_name": codec.Name,
"codec_type": codec.Type.String(),
},
}),
}