-
Notifications
You must be signed in to change notification settings - Fork 26
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
Enhance stats #17
Comments
I'm currently working on 1, albeit using the usual I'm also adding a toggle to hide the sensible data (bot token so far) from it, so it can be served public (json or not). |
Hmmm, I'm stuck with the bots. It starts at tdlight-telegram-bot-api/telegram-bot-api/ClientManager.cpp Lines 223 to 229 in 14bf658
goes through all the bots connected (which could be a very long list) and writes as many as possible to the buffer, until that buffer is full: tdlight-telegram-bot-api/telegram-bot-api/ClientManager.cpp Lines 247 to 250 in 14bf658
However I haven't find a way to really mimic that with how the Json works. |
I can probably have that write to the buffer as well, similar to how the text does it, I would say for a first implementation that probably wouldn't be an issue for most, as most of those self hosted instances will run with only a few bots, and if it get's too long you'll just have to fall back to the the non-json version for now. |
Awesome work, thank you. Keep us updated! |
Well I'm less in control of that buffer than I thought I would be when using the regular json stuff. |
While add it I also added a CLI flag to disable the display of sensible data (bot tokens + Webhook urls), which enables the stats to be hosted public. |
If someone already wants to give it a try, 374928c seems to be a working one. |
Statistics can be helpful in many ways such as monitoring the instance and implement load balancers.
https://botapi.example.org/botID:TOKEN/getStats
with a command line option or environment option to enable/disable it.Progress tracker
The text was updated successfully, but these errors were encountered: