Skip to content

Commit

Permalink
Add query to span as a tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
samwho committed Jul 31, 2024
1 parent e62298e commit f0dbaa5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/server/src/sdk/app/rows/search/sqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ async function runSqlQuery(

const db = context.getAppDB()

return await tracer.trace(
"sqs.runSqlQuery",
async () => await db.sql<Row>(sql, bindings)
)
return await tracer.trace("sqs.runSqlQuery", async span => {
span?.addTags({ sql })
return await db.sql<Row>(sql, bindings)
})
}
const response = await alias.queryWithAliasing(json, processSQLQuery)
if (opts?.countTotalRows) {
Expand Down

0 comments on commit f0dbaa5

Please sign in to comment.