-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add more instrumentation #4555
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 more instrumentation #4555
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,7 +244,7 @@ where | |
| /// Runs the worker until there are no more incoming requests. | ||
| #[instrument( | ||
| skip_all, | ||
| fields(chain_id = format!("{:.8}", self.chain_id)), | ||
| fields(chain_id = format!("{:.8}", self.chain_id), long_lived_services = %self.config.long_lived_services), | ||
| )] | ||
| async fn handle_requests( | ||
| self, | ||
|
|
@@ -276,9 +276,12 @@ where | |
| self.chain_id, | ||
| service_runtime_endpoint, | ||
| ) | ||
| .instrument(span.clone()) | ||
| .await?; | ||
|
|
||
| Box::pin(worker.handle_request(request).instrument(span)).await; | ||
| Box::pin(worker.handle_request(request)) | ||
| .instrument(span) | ||
| .await; | ||
|
|
||
| loop { | ||
| futures::select! { | ||
|
|
@@ -287,7 +290,7 @@ where | |
| let Some((request, span)) = maybe_request else { | ||
| break; // Request sender was dropped. | ||
| }; | ||
| Box::pin(worker.handle_request(request).instrument(span)).await; | ||
| Box::pin(worker.handle_request(request)).instrument(span).await; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small change but are you sure this is what we want? @Twey has more experience with these spans.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we instrument inside the pin, we reach the compilation recursion limit |
||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really decide how we label things. I've seen things like nickname , target, etc. and the are really NOT helping.