From 91cc18c411861ab9543c828d6fcb7d6b5eea2861 Mon Sep 17 00:00:00 2001 From: Salvador Girones Gil Date: Fri, 8 Sep 2023 20:21:25 +0200 Subject: [PATCH] [instrument] Move traces to debug (#2653) --- lib/src/dbs/executor.rs | 2 +- lib/src/kvs/ds.rs | 12 ++++++------ lib/src/sql/parser.rs | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/src/dbs/executor.rs b/lib/src/dbs/executor.rs index fd76b3a3..96735350 100644 --- a/lib/src/dbs/executor.rs +++ b/lib/src/dbs/executor.rs @@ -169,7 +169,7 @@ impl<'a> Executor<'a> { opt.set_db(Some(db.into())); } - #[instrument(name = "executor", skip_all)] + #[instrument(level = "debug", name = "executor", skip_all)] pub async fn execute( &mut self, mut ctx: Context<'_>, diff --git a/lib/src/kvs/ds.rs b/lib/src/kvs/ds.rs index ba53197a..803040a6 100644 --- a/lib/src/kvs/ds.rs +++ b/lib/src/kvs/ds.rs @@ -749,7 +749,7 @@ impl Datastore { /// Ok(()) /// } /// ``` - #[instrument(skip_all)] + #[instrument(level = "debug", skip_all)] pub async fn execute( &self, txt: &str, @@ -779,7 +779,7 @@ impl Datastore { /// Ok(()) /// } /// ``` - #[instrument(skip_all)] + #[instrument(level = "debug", skip_all)] pub async fn process( &self, ast: Query, @@ -844,7 +844,7 @@ impl Datastore { /// Ok(()) /// } /// ``` - #[instrument(skip_all)] + #[instrument(level = "debug", skip_all)] pub async fn compute( &self, val: Value, @@ -920,13 +920,13 @@ impl Datastore { /// Ok(()) /// } /// ``` - #[instrument(skip_all)] + #[instrument(level = "debug", skip_all)] pub fn notifications(&self) -> Option> { self.notification_channel.as_ref().map(|v| v.1.clone()) } /// Performs a full database export as SQL - #[instrument(skip(self, sess, chn))] + #[instrument(level = "debug", skip(self, sess, chn))] pub async fn export( &self, sess: &Session, @@ -951,7 +951,7 @@ impl Datastore { } /// Performs a database import from SQL - #[instrument(skip(self, sess, sql))] + #[instrument(level = "debug", skip(self, sess, sql))] pub async fn import(&self, sql: &str, sess: &Session) -> Result, Error> { // Skip auth for Anonymous users if auth is disabled let skip_auth = !self.is_auth_enabled() && sess.au.is_anon(); diff --git a/lib/src/sql/parser.rs b/lib/src/sql/parser.rs index 09807ae6..4296d141 100644 --- a/lib/src/sql/parser.rs +++ b/lib/src/sql/parser.rs @@ -19,37 +19,37 @@ use tracing::instrument; /// /// If you encounter this limit and believe that it should be increased, /// please [open an issue](https://github.com/surrealdb/surrealdb/issues)! -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn parse(input: &str) -> Result { parse_impl(input, query) } /// Parses a SurrealQL [`Thing`] -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn thing(input: &str) -> Result { parse_impl(input, super::thing::thing) } /// Parses a SurrealQL [`Idiom`] -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn idiom(input: &str) -> Result { parse_impl(input, super::idiom::plain) } /// Parses a SurrealQL [`Value`]. -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn value(input: &str) -> Result { parse_impl(input, super::value::value) } /// Parses a SurrealQL Subquery [`Subquery`] -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn subquery(input: &str) -> Result { parse_impl(input, super::subquery::subquery) } /// Parses JSON into an inert SurrealQL [`Value`] -#[instrument(name = "parser", skip_all, fields(length = input.len()))] +#[instrument(level = "debug", name = "parser", skip_all, fields(length = input.len()))] pub fn json(input: &str) -> Result { parse_impl(input.trim(), super::value::json) }