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

RSDK-8819: Instrument some grpc/webrtc FTDC stats. #385

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

dgottlieb
Copy link
Member

@dgottlieb dgottlieb commented Nov 7, 2024

There are some (minimal) RDK changes to get this hooked up. Here's an example of how these stats show up.

edit Oops, the "web service" was already a component. So we get double stats in that image!

image

@viambot viambot added the safe to test Mark as safe to test label Nov 7, 2024
TotalTimeConnectingMillis: srv.counters.TotalTimeConnectingMillis.Load(),
}
ret.PeersActive = ret.PeersConnected - ret.PeersDisconnected
ret.AverageTimeConnectingMillis = float64(ret.TotalTimeConnectingMillis) / float64(ret.PeersConnected)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The graph for this was all zeroes. The values this is derived from looked good so I need to figure out what happened here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured this out. Because PeersConnected starts at 0, golang assigns NaN to AverageTimeConnectingMillis.

And the ftdc format did not see that going from nan -> y(es)an as a "diff".

@viambot viambot added safe to test Mark as safe to test and removed safe to test Mark as safe to test labels Nov 7, 2024
Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Some questions (let me know if I'm going too deep on this stuff and you just want to get something in).

rpc/server.go Outdated Show resolved Hide resolved
rpc/server.go Show resolved Hide resolved
rpc/wrtc_server.go Outdated Show resolved Hide resolved
rpc/wrtc_server.go Show resolved Hide resolved
rpc/wrtc_server.go Outdated Show resolved Hide resolved
rpc/wrtc_server.go Outdated Show resolved Hide resolved
@viambot viambot added safe to test Mark as safe to test and removed safe to test Mark as safe to test labels Nov 18, 2024
@viambot viambot added safe to test Mark as safe to test and removed safe to test Mark as safe to test labels Nov 18, 2024
@viambot viambot added safe to test Mark as safe to test and removed safe to test Mark as safe to test labels Nov 18, 2024
Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks.

@dgottlieb dgottlieb merged commit eef94a9 into viamrobotics:main Nov 18, 2024
6 checks passed
@dgottlieb dgottlieb deleted the stats-methods branch November 18, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test Mark as safe to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants