Skip to content
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

Add per-client metrics to the RTR target. #115

Merged
merged 6 commits into from
May 16, 2024
Merged

Add per-client metrics to the RTR target. #115

merged 6 commits into from
May 16, 2024

Conversation

partim
Copy link
Member

@partim partim commented May 14, 2024

This PR adds per-client metrics to the RTR target. If enable for an RTR target through the new client-metrics config option, the target collects metrics for each unique client address encountered. These metrics are identical to those available in Routinator and include number of currently open connections, last serial number seen, last
update, last reset and serial update, and bytes read and written.

The PR also refactors the socket handling code in the RTR target by heavily borrowing from Routinator’s implementation.

Fixes #102.

@partim partim requested a review from a team May 15, 2024 09:20
src/targets/rtr.rs Show resolved Hide resolved
@partim
Copy link
Member Author

partim commented May 16, 2024

I did some quick fuzzing of the PerAddrMetrics mechanism – I didn’t check it in since all these things are private and should stay that way.

@partim partim merged commit ba1a483 into main May 16, 2024
9 checks passed
@partim partim deleted the rtr-client-metrics branch May 16, 2024 15:38
partim added a commit that referenced this pull request May 29, 2024
Breaking Changes

* Upgrade Rust edition, minimal Rust version to 1.70, and dependencies.
  ([#88], [#91])
* Removed internal serial numbers and the ability to pass optional diffs
  between units. ([#96])

New

* Added a new `merge` unit that merges the datasets of all its sources.
  ([#110], [#113])
* Added four new configuration options to the HTTP client:
  * `http-root-certs` for additional TLS root certificates,
  * `http-user-agent` for setting a custom user agent,
  * `http-client-addr` to specify a local address to bind to, and
  * `http-proxies` to add HTTP proxies (only available if the `socks` feature
     is enabled which it is by default). ([#111])
* The RTR timer values can now be configured for the RTR target. ([#106])
* The RTR target now produces metrics. By setting `client-metrics: true`
  in its configuration, the target produces separate metrics for each
  client address. ([#115], [#117])
* Log changes made by the `slurm` unit to updates. ([#87])
* The `slurm` unit now updates its data set if it discovers that the Slurm
  files have changed. ([#89])
* Both the `json` unit and target now support conditional HTTP requests
  via the Etag and Last-Modified headers. ([#98])

Bug Fixes

* Fix a race condition where the `slurm` unit would not apply its changes
  to the first update if loading the files is too slow. ([#89])
* Fixed various race conditions during startup and shutdown. ([#101])

Other Changes

* Upgrade the packaging and Docker build workflow to allow for
  cross-compilation. ([#90])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing metrics about the RTR clients
2 participants