docs: add telemetry docs

This commit is contained in:
Vikram Rangnekar
2020-05-24 10:44:00 -04:00
parent 1344246287
commit 31afdac3af
8 changed files with 89 additions and 6 deletions

View File

@ -275,9 +275,9 @@ func (c *scontext) resolveSQL() ([]byte, *stmt, error) {
// defaultRole := c.role
if useTx {
row = tx.QueryRow(finalSQL)
row = tx.QueryRowContext(c, finalSQL)
} else {
row = c.sg.db.QueryRow(finalSQL)
row = c.sg.db.QueryRowContext(c, finalSQL)
}
if len(stmts) > 1 {

View File

@ -134,7 +134,7 @@ func (sg *SuperGraph) prepareStmt(item allow.Item) error {
func (sg *SuperGraph) prepare(ct context.Context, st []stmt, key string) error {
finalSQL, am := processTemplate(st[0].sql)
sd, err := sg.db.Prepare(finalSQL)
sd, err := sg.db.PrepareContext(ct, finalSQL)
if err != nil {
return fmt.Errorf("prepare failed: %v: %s", err, finalSQL)
}