-
Notifications
You must be signed in to change notification settings - Fork 46
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
Overhaul stats events: merge HTTP core events with a different IP version #1374
Merged
josecelano
merged 5 commits into
torrust:develop
from
josecelano:1373-overhaul-stats-events-group-http-core-events-by-ip-version
Mar 17, 2025
Merged
Overhaul stats events: merge HTTP core events with a different IP version #1374
josecelano
merged 5 commits into
torrust:develop
from
josecelano:1373-overhaul-stats-events-group-http-core-events-by-ip-version
Mar 17, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1374 +/- ##
===========================================
+ Coverage 81.59% 81.77% +0.18%
===========================================
Files 229 230 +1
Lines 16618 16806 +188
Branches 16618 16806 +188
===========================================
+ Hits 13559 13743 +184
- Misses 2818 2821 +3
- Partials 241 242 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9abed69
to
0eec5b7
Compare
…in HTTP tracker Instead of only the IP. The port will be abailable in evetns so we can build metrics also using the client's port.
To also run doctests.
0eec5b7
to
1f30f8e
Compare
ACK 1f30f8e |
2 tasks
josecelano
added a commit
that referenced
this pull request
Mar 17, 2025
…erent IP version 8603f8b refactor: [#1380] refactor: [#1373] merge UDP stats events with different IP version (Jose Celano) 2be682e refactor: [#1380] refactor: [#1371] add connection context to UDP core events (Jose Celano) Pull request description: Change events from this: `bittorrent_udp_tracker_core::statistics::event::Event`: ```rust pub enum Event { Udp4Connect, Udp4Announce, Udp4Scrape, Udp6Connect, Udp6Announce, Udp6Scrape, } ``` To this: ```rust pub enum Event { UdpConnect { context: ConnectionContext }, UdpAnnounce { context: ConnectionContext }, UdpScrape { context: ConnectionContext }, } pub struct ConnectionContext { client_socket_addr: SocketAddr, server_socket_addr: SocketAddr, } ``` This have also be done for [HTTP core events](#1374). ### Sub-tasks - [x] Add `ConnectionContext` to events. - [x] Merge events with the same request type (`connect`, `announce` and `scrape`). ACKs for top commit: josecelano: ACK 8603f8b Tree-SHA512: dde61535ec1f6c768ae2ad4d911e4ecece9be94c2546fd7b06a0d8d45d122caa6fcbf370cfa5de61a0d10424927cef17f7faf0a351252ab28ccb17e38058269e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
- Developer -
Torrust Improvement Experience
Code Cleanup / Refactoring
Tidying and Making Neat
Enhancement / Feature Request
Something New
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change HTTP core tracker events (
bittorrent_http_tracker_core::statistics::event::Event
) from this:To this:
Sub-tasks
ConnectionContext
to events.announce
andscrape
).ConnectionContext
.ClientIpSources
type and thepackages/axum-http-tracker-server/src/v1/extractors/client_ip_sources.rs
Axum extractor have to be changed to include also the port.