-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix the printing of ascii codes on tracy and improve some tracing #341
Conversation
@@ -466,7 +466,7 @@ impl RelationalDB { | |||
/// where the column data identified by `cols` matches `value`. | |||
/// | |||
/// 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
@@ -494,7 +494,7 @@ impl RelationalDB { | |||
.iter_by_col_range_mut_tx(tx, TableId(table_id), ColId(col_id), range) | |||
} | |||
|
|||
#[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.
@@ -43,7 +43,7 @@ impl InstanceEnv { | |||
} | |||
} | |||
|
|||
#[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!
@@ -339,7 +339,7 @@ impl<T: WasmInstance> ModuleInstance for WasmModuleInstance<T> { | |||
self.trapped | |||
} | |||
|
|||
#[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...
@@ -52,7 +52,7 @@ fn collect_result(result: &mut Vec<MemTable>, r: CodeResult) -> Result<(), DBErr | |||
Ok(()) | |||
} | |||
|
|||
#[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 <cloutiertyler@users.noreply.github.com>
Description of Changes
This helps to visualize
tracy
events better.API and ABI
If the API is breaking, please state below what will break