-
Notifications
You must be signed in to change notification settings - Fork 0
Implement structured logging, tracing spans, and TracingConfig API #488
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5b6c234
feat(client): add structured logging and tracing spans with timing co…
leynos 8f7e69b
refactor(client tests tracing): use helper fn to simplify tracing tests
leynos 71b1215
refactor(tests): introduce test_span_emission! macro to simplify trac…
leynos 1880cee
feat(client,tracing): add per-operation timing emission and error spa…
leynos 830ca32
feat(client,tracing): instrument async client methods with tracing::I…
leynos 51bd3d3
feat(client,tracing): add timing event emission and enhance TracingCo…
leynos c09c618
refactor(tests): use shared Tokio runtime handle in client tracing tests
leynos 1f8d679
refactor(client tracing tests): handle optional Tokio runtime initial…
leynos 3d9422a
docs(execplans): fix line wrapping in structured logging doc
leynos 23dfada
docs(execplans): fix minor typos in structured logging markdown
leynos 109eb95
docs(execplans): clarify instructions to run commands from repo root
leynos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
751 changes: 751 additions & 0 deletions
751
docs/execplans/11-1-2-structured-logging-and-tracing-spans.md
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| //! Tracing configuration builder method for [`WireframeClientBuilder`]. | ||
|
|
||
| use super::WireframeClientBuilder; | ||
| use crate::{client::tracing_config::TracingConfig, serializer::Serializer}; | ||
|
|
||
| impl<S, P, C> WireframeClientBuilder<S, P, C> | ||
| where | ||
| S: Serializer + Send + Sync, | ||
| { | ||
| /// Configure tracing instrumentation for the client. | ||
| /// | ||
| /// The [`TracingConfig`] controls which operations emit tracing spans, | ||
| /// at what level, and whether per-command elapsed-time events are | ||
| /// recorded. | ||
| /// | ||
| /// When not called, the client uses [`TracingConfig::default()`], which | ||
| /// emits `INFO` spans for lifecycle operations (`connect`, `close`) and | ||
| /// `DEBUG` spans for data operations (`send`, `receive`, `call`, | ||
| /// `call_streaming`). Timing is disabled by default. | ||
| /// | ||
| /// # Examples | ||
| /// | ||
| /// ``` | ||
| /// use wireframe::client::{TracingConfig, WireframeClientBuilder}; | ||
| /// | ||
| /// let config = TracingConfig::default().with_all_timing(true); | ||
| /// let builder = WireframeClientBuilder::new().tracing_config(config); | ||
| /// let _ = builder; | ||
| /// ``` | ||
| #[must_use] | ||
| pub fn tracing_config(mut self, config: TracingConfig) -> Self { | ||
| self.tracing_config = config; | ||
| self | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.