spans in logs
This commit is contained in:
@@ -126,7 +126,6 @@ impl NewsletterIssue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip_all)]
|
|
||||||
async fn get_issue(
|
async fn get_issue(
|
||||||
connection_pool: &PgPool,
|
connection_pool: &PgPool,
|
||||||
issue_id: Uuid,
|
issue_id: Uuid,
|
||||||
@@ -152,7 +151,6 @@ pub struct Task {
|
|||||||
pub kind: String,
|
pub kind: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip_all)]
|
|
||||||
async fn dequeue_task(
|
async fn dequeue_task(
|
||||||
connection_pool: &PgPool,
|
connection_pool: &PgPool,
|
||||||
) -> Result<Option<(Transaction<'static, Postgres>, Task)>, anyhow::Error> {
|
) -> Result<Option<(Transaction<'static, Postgres>, Task)>, anyhow::Error> {
|
||||||
@@ -180,7 +178,6 @@ async fn dequeue_task(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip_all)]
|
|
||||||
async fn delete_task(
|
async fn delete_task(
|
||||||
mut transaction: Transaction<'static, Postgres>,
|
mut transaction: Transaction<'static, Postgres>,
|
||||||
issue_id: Uuid,
|
issue_id: Uuid,
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
use tokio::task::JoinHandle;
|
use tokio::task::JoinHandle;
|
||||||
use tracing_subscriber::{fmt::MakeWriter, layer::SubscriberExt, util::SubscriberInitExt};
|
use tracing_subscriber::{
|
||||||
|
fmt::{MakeWriter, format::FmtSpan},
|
||||||
|
layer::SubscriberExt,
|
||||||
|
util::SubscriberInitExt,
|
||||||
|
};
|
||||||
|
|
||||||
pub fn init_subscriber<Sink>(sink: Sink)
|
pub fn init_subscriber<Sink>(sink: Sink)
|
||||||
where
|
where
|
||||||
@@ -15,7 +19,12 @@ where
|
|||||||
.into()
|
.into()
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.with(tracing_subscriber::fmt::layer().pretty().with_writer(sink))
|
.with(
|
||||||
|
tracing_subscriber::fmt::layer()
|
||||||
|
.pretty()
|
||||||
|
.with_writer(sink)
|
||||||
|
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE),
|
||||||
|
)
|
||||||
.init();
|
.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user