Skip to content

Commit 253e7f7

Browse files
grahamcclaude
andcommitted
fix(tracing): align backend_pid field name on postgres.close
Review finding #5: postgres.establish records the backend PID as `db.postgresql.backend_pid` but postgres.close recorded the same value as plain `backend_pid`, so consumers filtering on the field name would miss one. Use `db.postgresql.backend_pid` in both spans. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a314465 commit 253e7f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • sqlx-postgres/src/connection

sqlx-postgres/src/connection/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl Connection for PgConnection {
163163
target = "sqlx::connect",
164164
name = "postgres.close",
165165
skip_all,
166-
fields(db.system = "postgresql", backend_pid = self.inner.process_id),
166+
fields(db.system = "postgresql", db.postgresql.backend_pid = self.inner.process_id),
167167
level = "debug",
168168
)]
169169
async fn close(mut self) -> Result<(), Error> {

0 commit comments

Comments
 (0)