-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bandwidth tracking and reporting #1860
Comments
Would you like to submit a PR? I would enable statistics tracking behind an option BTW |
Can you explain what you mean "behind an option"? Do you mean that they can be enabled/disabled by setting a flag (i.e. give the user an option to enable them) or do you mean behind an optional plugin of some sort? Sorry for the confusion. |
Behind a client option because this comes with a little overhead that some users may want to avoid if not needed :) |
So, something like a |
yeah |
Is your feature request related to a problem? Please describe.
No. My feature request is related to monitoring statistics of the MQTT connection.
Describe the solution you'd like
It would be nice to have some telemetry properties available in the MQTT class, that provide tracking of the following connection statistics:
Bandwidth usage (upload and download as separate properties)
Number of reconnections
Also expose functions or setters to reset the counters as needed. (Don't reset between connections)
Example usage:
These parameters should already be available from the underlying socket object, or could easily be counted within the methods which transmit data over the wire (i.e. before calling
socket.write()
and within thedata
event handler).Describe alternatives you've considered
N/A
Additional context
The text was updated successfully, but these errors were encountered: