-
Notifications
You must be signed in to change notification settings - Fork 645
Fix the printing of ascii codes on tracy and improve some tracing #341
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
Conversation
| /// | ||
| /// Matching is defined by `Ord for AlgebraicValue`. | ||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, value))] |
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.
The actual table and column names would be useful to capture here, but because we only have the IDs, it's probably ok to just skip_all.
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 table id might be useful tbh
| } | ||
|
|
||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, row))] |
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.
Similarly here.
| } | ||
|
|
||
| #[tracing::instrument(skip_all)] | ||
| #[tracing::instrument(skip_all, fields(reducer=reducer))] |
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.
Nice!
| } | ||
|
|
||
| #[tracing::instrument(skip(args))] | ||
| #[tracing::instrument(skip(self, args), fields(db_id=self.instance.instance_env().dbic.database_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.
By calling self.instance.instance_env().dbic.database_id won't this add overhead to the init_database call that won't be reflective of its true characteristics?
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.
Actually instance_env() shouldn't add any meaningful overhead, but we probably want to avoid calling arbitrary methods as part of trace logging since in general we don't know exactly how much overhead that will add to the span.
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.
It looks minimal:
fn instance_env(&self) -> &InstanceEnv {
&self.env.as_ref(&self.store).instance_env
}Also this is only in the init of the db. The rest of the calls should take more time...
| } | ||
|
|
||
| #[tracing::instrument(skip(db, tx, auth))] | ||
| #[tracing::instrument(skip_all)] |
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 create a ticket to capture the actual sql string here that we compiled earlier.
Signed-off-by: Tyler Cloutier <[email protected]>
Description of Changes
This helps to visualize
tracyevents better.API and ABI
If the API is breaking, please state below what will break