You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
903d47f feat: [#1145] add UDP avg processing time to stats (Jose Celano)
08a862a refactor: [#1145] add type and processing time to UDP response events (Jose Celano)
1ce2e33 feat: [#1145] add banned ips total for UDP to stats (Jose Celano)
1299f17 feat: make ban service generic for all trackers (Jose Celano)
6f9b44c feat: [#1145] add banned reqs counter to stats (Jose Celano)
2ff476b refactor: rename enum variand Udp4RequestAborted (Jose Celano)
Pull request description:
Add more metrics useful for detecting tracker errors and load level.
### UDP
- [x] `udp_requests_banned`: the total number of UDP requests that have been banned.
- [x] `udp_banned_ips_total`: the total number of IPs that have been banned for sending wrong connection IDs.
- [x] `udp_avg_connect_processing_time_ns`: the average time processing a UDP connect request.
- [x] `udp_avg_announce_processing_time_ns`: the average time processing a UDP announce request.
- [x] `udp_avg_scrape_processing_time_ns`: the average time processing a UDP scrape request.
### Important refactor
I needed to pass the Ban Service to the stats handler to get some values. I did not want to add the ban service to the tracker because the tracker is already to "fat". It has many responsibilities. In fact, I want to extract new services out of the tracker like whitelist, authorization, etc. My plan was to extract them and leave the tracker as the application services container. However I think it will be easier if we:
- We pass new services like `BanService` directly to handlers instead of using the tracker as a facade.
- Move other services out of the `Tracker` and also pass them directly to handlers.
At the end, the `Tracker` should have only a couple of methods like `announce` and `scrape`.
ACKs for top commit:
josecelano:
ACK 903d47f
Tree-SHA512: 31a8436466ea04608558e603fa8e60fd242dd44c5faae890db1234da31ac245d9eea824aa18d6f5ce3a84b94825909239d965d8f6ac62fddf0de3ac8bfd6b228
0 commit comments