-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e3a8454
to
599673a
Compare
599673a
to
45b67e5
Compare
1224256
to
4137625
Compare
45b67e5
to
1736f76
Compare
8125d96
to
0cc954c
Compare
1736f76
to
e700d67
Compare
0cc954c
to
76f7ddd
Compare
7a6a2aa
to
59b4fa0
Compare
76f7ddd
to
7131de0
Compare
59b4fa0
to
e46dc1a
Compare
7131de0
to
d6d672c
Compare
e46dc1a
to
f1302de
Compare
3c906b7
to
3de7061
Compare
linera-chain/src/chain.rs
Outdated
|
||
#[instrument(target = "telemetry_only", skip_all, fields( | ||
chain_id = %self.chain_id(), | ||
next_block_height = %self.tip_state.get().next_block_height |
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.
I think the block height is unnecessary detail, it will obscure the trace.
|
||
#[instrument(target = "telemetry_only", skip_all, fields( | ||
chain_id = %self.chain_id(), | ||
target = %target, |
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.
linera-chain/src/chain.rs
Outdated
/// Removes the incoming message bundles in the block from the inboxes. | ||
#[instrument(target = "telemetry_only", skip_all, fields( | ||
chain_id = %self.chain_id(), | ||
timestamp = %timestamp |
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.
I'd drop timestamp
from there.
|
||
/// Runs the worker until there are no more incoming requests. | ||
#[instrument( | ||
target = "telemetry_only", |
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.
So we won't see this in the normal logs anymore?
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.
Will remove
break; // Request sender was dropped. | ||
}; | ||
Box::pin(worker.handle_request(request).instrument(span)).await; | ||
Box::pin(worker.handle_request(request)).instrument(span).await; |
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.
Small change but are you sure this is what we want? @Twey has more experience with these spans.
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.
If we instrument inside the pin, we reach the compilation recursion limit
|
||
/// Handles a request and applies it to the chain state. | ||
#[instrument(skip_all)] | ||
#[instrument(target = "telemetry_only", skip_all, fields(chain_id = %self.chain_id()))] |
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.
Same – this won't show up in the normal logs anymore?
/// Returns the requested blob, if it belongs to the current locking block or pending proposal. | ||
#[instrument(target = "telemetry_only", skip_all, fields( | ||
chain_id = %self.chain_id(), | ||
blob_id = %blob_id |
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.
blob_id
is IMHO unnecessary.
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.
I think we should discuss which logs we want for telemtry-only vs log file. Also, I think some details in the trace are unneccessary: timestamp, block height.
f62b7d2
to
cfa2f37
Compare
82bf2c1
to
a866aa0
Compare
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.
I think a lot of logging, especially in grpc.rs
was read in the console/log file. Now it's all telemetry-only.
Ah, you're right! I'll do a pass, and if it was already |
a866aa0
to
b9e388c
Compare
b9e388c
to
21cef69
Compare
Now that we have distributed tracing (after #4556), we need more instrumentation so we have data about more functions in the breakdowns. Instrument more functions with `telemetry_only` so that we don't get spammed in our logs, but the spans still get sent to Tempo. Tested this with #4556, saw the spans properly show in the breakdowns. - Nothing to do / These changes follow the usual release cycle.
Motivation
Now that we have distributed tracing (after #4556), we need more instrumentation so we have data about more functions in the breakdowns.
Proposal
Instrument more functions with
telemetry_only
so that we don't get spammed in our logs, but the spans still get sent to Tempo.Test Plan
Tested this with #4556, saw the spans properly show in the breakdowns.
Release Plan