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

Observability in library and statime linux #390

Merged

Conversation

cikzh
Copy link
Member

@cikzh cikzh commented Jan 31, 2024

This PR will add a Prometheus exporter, which will get its metrics from statime-linux via a Unix Domain Socket, very similar to how ntpd-rs does it.

It implements all currently available Instance datasets and exposes only a small set of metrics. The full exposure of metrics will be implemented in a separate PR

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 123 lines in your changes are missing coverage. Please review.

Comparison is base (8fd3820) 62.05% compared to head (f59e4db) 61.09%.
Report is 24 commits behind head on main.

❗ Current head f59e4db differs from pull request most recent head 8123fb3. Consider uploading reports for the commit 8123fb3 to get more accurate results

Files Patch % Lines
statime-linux/src/metrics/exporter.rs 0.00% 57 Missing ⚠️
statime/src/ptp_instance.rs 0.00% 21 Missing ⚠️
statime/src/observability/mod.rs 0.00% 14 Missing ⚠️
statime-linux/src/observer.rs 0.00% 11 Missing ⚠️
...tatime/src/datastructures/common/clock_identity.rs 0.00% 9 Missing ⚠️
statime-linux/src/main.rs 0.00% 7 Missing ⚠️
...tatime/src/datastructures/common/clock_accuracy.rs 50.00% 1 Missing ⚠️
statime/src/datastructures/common/clock_quality.rs 0.00% 1 Missing ⚠️
statime/src/datastructures/datasets/default.rs 0.00% 1 Missing ⚠️
statime/src/datastructures/messages/header.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #390      +/-   ##
==========================================
- Coverage   62.05%   61.09%   -0.97%     
==========================================
  Files          55       56       +1     
  Lines        6903     7012     +109     
==========================================
  Hits         4284     4284              
- Misses       2619     2728     +109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cikzh cikzh marked this pull request as ready for review February 8, 2024 16:14
@cikzh cikzh requested a review from davidv1992 February 8, 2024 16:15
@cikzh cikzh mentioned this pull request Feb 8, 2024
statime/src/observability/mod.rs Outdated Show resolved Hide resolved
statime/src/ptp_instance.rs Outdated Show resolved Hide resolved
statime/src/ptp_instance.rs Outdated Show resolved Hide resolved
statime/src/ptp_instance.rs Outdated Show resolved Hide resolved
@cikzh cikzh force-pushed the 284-implement-observability-in-library-and-statime-linux branch 3 times, most recently from 516401b to efeca5c Compare February 9, 2024 16:03
Copy link
Member

@davidv1992 davidv1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Reverts #405 but I am fine with that as that did not fix the issue anyway.

Copy link
Member

@davidv1992 davidv1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, missed that sdoId still has the default serde deserializer, which is problematic as an sdo id should be below 2^12, which this doesn't enforce.

@cikzh cikzh force-pushed the 284-implement-observability-in-library-and-statime-linux branch from bb5e5d5 to 44bacdc Compare February 16, 2024 10:21
@cikzh cikzh force-pushed the 284-implement-observability-in-library-and-statime-linux branch from 44bacdc to cc37eb1 Compare February 16, 2024 10:31
davidv1992
davidv1992 previously approved these changes Feb 16, 2024
statime/src/ptp_instance.rs Outdated Show resolved Hide resolved
@rnijveld rnijveld added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit 43df041 Feb 21, 2024
4 checks passed
@rnijveld rnijveld deleted the 284-implement-observability-in-library-and-statime-linux branch February 21, 2024 08:11
@cikzh cikzh mentioned this pull request Feb 22, 2024
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.

3 participants