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

Feat: Add additional information in SRT metrics label #3941

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all 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
2 changes: 1 addition & 1 deletion internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (m *Metrics) onMetrics(ctx *gin.Context) {
data, err := m.srtServer.APIConnsList()
if err == nil && len(data.Items) != 0 {
for _, i := range data.Items {
tags := "{id=\"" + i.ID.String() + "\",state=\"" + string(i.State) + "\"}"
tags := "{id=\"" + i.ID.String() + "\",state=\"" + string(i.State) + "\",path=\"" + string(i.Path) + "\",addr=\"" + string(i.RemoteAddr) + "\"}"
out += metric("srt_conns", tags, 1)
out += metric("srt_conns_packets_sent", tags, int64(i.PacketsSent))
out += metric("srt_conns_packets_received", tags, int64(i.PacketsReceived))
Expand Down