Add SQLx operation tracing (#5223)

* wip: vendor sqlx-tracing

* (compiles) standardize pg types used

* more standardization

* general log message improvements

* wip: improve sqlx-tracing architecture

* unify sqlx::Executor type

* wip: try fix sqlx tracing

* wip: sqlx-tracing compiles

* so close

* it compiles

* fix ci
This commit is contained in:
aecsocket
2026-01-28 13:38:57 +00:00
committed by GitHub
parent 7cb7e881fa
commit e57c15b3ce
146 changed files with 7320 additions and 801 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
use crate::database::PgPool;
use chrono::Utc;
use eyre::{Result, eyre};
use futures::{StreamExt, TryFutureExt, stream::FuturesUnordered};
use modrinth_util::decimal::Decimal2dp;
use rust_decimal::{Decimal, prelude::ToPrimitive};
use serde::{Deserialize, Serialize};
use sqlx::PgPool;
use tracing::{info, trace, warn};
use crate::{
@@ -177,7 +177,7 @@ pub async fn sync_pending_payouts_from_mural(
.collect::<Vec<String>>(),
i64::from(limit),
)
.fetch_all(&mut *txn)
.fetch_all(&mut txn)
.await
.wrap_internal_err("failed to fetch incomplete Mural payouts")?;
@@ -235,7 +235,7 @@ pub async fn sync_pending_payouts_from_mural(
&payout_ids,
&payout_statuses,
)
.execute(&mut *txn)
.execute(&mut txn)
.await
.wrap_internal_err("failed to update payout statuses")?;
@@ -452,7 +452,7 @@ mod tests {
}
async fn setup_test_db_with_payouts(
db: &sqlx::PgPool,
db: &PgPool,
payouts: Vec<(i64, String, PayoutStatus)>,
) -> Result<(), eyre::Error> {
for (id, platform_id, status) in payouts {