-
Notifications
You must be signed in to change notification settings - Fork 97
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
expose a few connection stats #138
Conversation
@@ -8,7 +8,7 @@ jobs: | |||
test: | |||
strategy: | |||
matrix: | |||
go-version: [ 1.13.x, 1.x ] | |||
go-version: [ 1.15.x, 1.x ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this up because the go.mod also has 1.15. Figured that should match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the stat collection optional?
I can take out the counters, then the stats would have the main part I care about (the size of the channels), which would only ever be fetched on request. Would that be ok? |
yeah, that works, I'm not against the counters, my thinking is to have an internal boolean field in the Conn enabled via a |
Alrighty! In an effort to keep the counters in, I added a boolean around the increments |
My company currently uses go-stomp in a sidecar attached to a main service. We've seen some deadlocks during normal operation, and wanted to monitor a few internal states within go-stomp. This change adds a simple struct defining the sizes of the read and write channels in a
Connection
object, as well as a few super basic counters. Our software would periodically callConnection.Stats()
and export the data to our metrics systems for further monitoring.