Add query to span as a tag.
This commit is contained in:
parent
e62298e199
commit
f0dbaa5eae
|
@ -227,10 +227,10 @@ async function runSqlQuery(
|
||||||
|
|
||||||
const db = context.getAppDB()
|
const db = context.getAppDB()
|
||||||
|
|
||||||
return await tracer.trace(
|
return await tracer.trace("sqs.runSqlQuery", async span => {
|
||||||
"sqs.runSqlQuery",
|
span?.addTags({ sql })
|
||||||
async () => await db.sql<Row>(sql, bindings)
|
return await db.sql<Row>(sql, bindings)
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
const response = await alias.queryWithAliasing(json, processSQLQuery)
|
const response = await alias.queryWithAliasing(json, processSQLQuery)
|
||||||
if (opts?.countTotalRows) {
|
if (opts?.countTotalRows) {
|
||||||
|
|
Loading…
Reference in New Issue