Merged
Conversation
5ac611f to
3f18b6b
Compare
dillongeorge
commented
Oct 2, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #453 +/- ##
==========================================
- Coverage 88.61% 87.91% -0.71%
==========================================
Files 39 38 -1
Lines 9109 8192 -917
==========================================
- Hits 8072 7202 -870
+ Misses 1037 990 -47 ☔ View full report in Codecov by Sentry. |
slawlor
approved these changes
Oct 2, 2024
Contributor
slawlor
left a comment
There was a problem hiding this comment.
Lgtm thanks for the great addition!
8bd1527 to
b40f08c
Compare
**Context** The [`tracing`](https://docs.rs/tracing/latest/tracing/index.html) crate enables more robust instrumentation of Rust programs compared to basic logging. With this patch, we introduce the `tracing` crate into AKD and only enable it when the `tracing` feature is specified. By default, the feature is disabled and we continue to leverage basic logging. To enable instrumentation, we leverage another feature `tracing_instrument` to control whether or not AKD generates spans for instrumented functions. In addition to adding `tracing` based logging and instrumentation throughout the `akd` lib (i.e. not `akd_core`), various grammatical and organizational improvements were made in areas where tracing was being added. Notably, the `log_metrics` functions which exist throughout the storage layer were updated to simply log with `info` level instead of taking an argument to specify the level. Rationale being that the `log_metrics` functions are only called when the `runtime_metrics` feature is enabled and `info` is a fair median to assume. **Testing** Since no major functional changes were made, the changes were tested via existing automated tests with various different feature flags being passed to toggle `tracing` on and off.
b40f08c to
f5ce4e2
Compare
slawlor
reviewed
Oct 15, 2024
Contributor
slawlor
left a comment
There was a problem hiding this comment.
couple of tiny changes, but overall lgtm
| Directory::<TC, S, V>::get_azks_from_storage(&self.storage, false).await | ||
| } | ||
|
|
||
| #[cfg_attr(feature = "tracing_instrument", tracing::instrument(skip_all, fields(ignore_cache = ignore_cache)))] |
| /// Shim module to group logging-related macros more easily | ||
| /// when switching between [log](https://docs.rs/log/latest/log/) | ||
| /// and [tracing](https://docs.rs/tracing/latest/tracing/). | ||
| pub mod log { |
Contributor
|
whoops totally missed that this was already merged, sorry! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
The
tracingcrate enables more robust instrumentation of Rust programs compared to basic logging. With this patch, we introduce thetracingcrate into AKD and only enable it when thetracingfeature is specified. By default, the feature is disabled and we continue to leverage basic logging.In addition to adding
tracingbased logging and instrumentation throughout theakdlib (i.e. notakd_core), various grammatical and organizational improvements were made in areas where tracing was being added. Notably, thelog_metricsfunctions which exist throughout the storage layer were updated to simply log withinfolevel instead of taking an argument to specify the level. Rationale being that thelog_metricsfunctions are only called when theruntime_metricsfeature is enabled andinfois a fair median to assume.Testing
Since no major functional changes were made, the changes were tested via existing automated tests with various different feature flags being passed to toggle
tracingon and off.