Add missing sentry error backtrace
Clear traces spam
This commit is contained in:
+7
-2
@@ -97,9 +97,14 @@ impl Bot {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip(self))]
|
||||
#[instrument(skip(self), fields(repo, pr))]
|
||||
pub async fn exec(&self, webhook: WebhookType) {
|
||||
tracing::Span::current().record("webhook_type", tracing::field::debug(&webhook));
|
||||
match &webhook {
|
||||
WebhookType::Review(p) => {
|
||||
tracing::Span::current().record("repo", &p.repository.full_name);
|
||||
tracing::Span::current().record("pr", p.pull_request.number);
|
||||
}
|
||||
}
|
||||
let exec_result = match webhook {
|
||||
WebhookType::Review(review_payload) => crate::bot_actions::review::exec_review(
|
||||
&self.gitea_api,
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::{
|
||||
open_router::OpenRouterClient,
|
||||
};
|
||||
|
||||
#[instrument(skip(gitea_api, open_router_client, http_client, review_payload), err)]
|
||||
#[instrument(skip(gitea_api, open_router_client, http_client, review_payload))]
|
||||
pub async fn exec_review(
|
||||
gitea_api: &GiteaAPI,
|
||||
open_router_client: &OpenRouterClient,
|
||||
|
||||
+4
-4
@@ -29,7 +29,7 @@ impl GiteaAPI {
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(skip(self), err)]
|
||||
#[instrument(skip(self))]
|
||||
pub async fn comment(
|
||||
&self,
|
||||
body: &str,
|
||||
@@ -57,7 +57,7 @@ impl GiteaAPI {
|
||||
res.json::<Comment>().await.map_err(anyhow::Error::from)
|
||||
}
|
||||
|
||||
#[instrument(skip(self), err)]
|
||||
#[instrument(skip(self))]
|
||||
pub async fn edit_comment(
|
||||
&self,
|
||||
body: &str,
|
||||
@@ -85,7 +85,7 @@ impl GiteaAPI {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip(self), err)]
|
||||
#[instrument(skip(self))]
|
||||
pub async fn delete_comment(&self, full_name: &str, comment_id: u64) -> anyhow::Result<()> {
|
||||
let url = format!(
|
||||
"{}/api/v1/repos/{}/issues/comments/{}",
|
||||
@@ -104,7 +104,7 @@ impl GiteaAPI {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip(self, review_result), err)]
|
||||
#[instrument(skip(self, review_result))]
|
||||
pub async fn post_pull_request_review(
|
||||
&self,
|
||||
review_result: &ReviewResult,
|
||||
|
||||
Reference in New Issue
Block a user