diff --git a/crates/pgt_lsp/src/handlers/code_actions.rs b/crates/pgt_lsp/src/handlers/code_actions.rs index dd8b1f1e..0d124cfc 100644 --- a/crates/pgt_lsp/src/handlers/code_actions.rs +++ b/crates/pgt_lsp/src/handlers/code_actions.rs @@ -9,6 +9,7 @@ use pgt_workspace::features::code_actions::{ CodeActionKind, CodeActionsParams, CommandActionCategory, ExecuteStatementParams, }; +#[tracing::instrument(level = "debug", skip(session), err)] pub fn get_actions( session: &Session, params: lsp_types::CodeActionParams, @@ -71,6 +72,7 @@ pub fn command_id(command: &CommandActionCategory) -> String { } } +#[tracing::instrument(level = "debug", skip(session), err)] pub async fn execute_command( session: &Session, params: ExecuteCommandParams, diff --git a/crates/pgt_lsp/src/handlers/completions.rs b/crates/pgt_lsp/src/handlers/completions.rs index f18ae598..e9a18a6e 100644 --- a/crates/pgt_lsp/src/handlers/completions.rs +++ b/crates/pgt_lsp/src/handlers/completions.rs @@ -3,11 +3,7 @@ use anyhow::Result; use pgt_workspace::{WorkspaceError, features::completions::GetCompletionsParams}; use tower_lsp::lsp_types::{self, CompletionItem, CompletionItemLabelDetails}; -#[tracing::instrument(level = "debug", skip_all, fields( - url = params.text_document_position.text_document.uri.as_str(), - character = params.text_document_position.position.character, - line = params.text_document_position.position.line -), err)] +#[tracing::instrument(level = "debug", skip(session), err)] pub fn get_completions( session: &Session, params: lsp_types::CompletionParams, diff --git a/crates/pgt_lsp/src/handlers/text_document.rs b/crates/pgt_lsp/src/handlers/text_document.rs index d36b8a32..63250ef5 100644 --- a/crates/pgt_lsp/src/handlers/text_document.rs +++ b/crates/pgt_lsp/src/handlers/text_document.rs @@ -10,10 +10,7 @@ use tower_lsp::lsp_types; use tracing::error; /// Handler for `textDocument/didOpen` LSP notification -#[tracing::instrument(level = "info", skip_all, fields( - url = params.text_document.uri.as_str(), - version = params.text_document.version -), err)] +#[tracing::instrument(level = "debug", skip(session), err)] pub(crate) async fn did_open( session: &Session, params: lsp_types::DidOpenTextDocumentParams, @@ -41,11 +38,7 @@ pub(crate) async fn did_open( } // Handler for `textDocument/didChange` LSP notification -#[tracing::instrument(level = "debug", skip_all, fields( - uri = params.text_document.uri.as_str(), - version = params.text_document.version, - num_content_changes = params.content_changes.len() -), err)] +#[tracing::instrument(level = "debug", skip(session), err)] pub(crate) async fn did_change( session: &Session, params: lsp_types::DidChangeTextDocumentParams, @@ -97,9 +90,7 @@ pub(crate) async fn did_change( } /// Handler for `textDocument/didClose` LSP notification -#[tracing::instrument(level = "info", skip_all, fields( - url = params.text_document.uri.as_str(), -), err)] +#[tracing::instrument(level = "debug", skip(session), err)] pub(crate) async fn did_close( session: &Session, params: lsp_types::DidCloseTextDocumentParams,