Skip to content

Commit ce064ee

Browse files
authored
Merge 9714f33 into blathers/backport-release-26.1-159964
2 parents 593ae86 + 9714f33 commit ce064ee

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

pkg/sql/conn_executor_exec.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4456,15 +4456,24 @@ func (ex *connExecutor) execWithProfiling(
44564456
}
44574457
// Compute fingerprint ID here since ih.Setup hasn't been called yet.
44584458
fingerprintID := appstatspb.ConstructStatementFingerprintID(
4459-
stmtNoConstants, ex.implicitTxn(), ex.sessionData().Database)
4460-
pprofutil.Do(ctx, func(ctx context.Context) {
4461-
err = op(ctx)
4462-
},
4459+
stmtNoConstants, ex.implicitTxn(), ex.sessionData().Database,
4460+
)
4461+
labels := []string{
44634462
workloadid.ProfileTag, sqlstatsutil.EncodeStmtFingerprintIDToString(fingerprintID),
44644463
"appname", ex.sessionData().ApplicationName,
44654464
"addr", remoteAddr,
44664465
"stmt.tag", ast.StatementTag(),
44674466
"stmt.no.constants", stmtNoConstants,
4467+
}
4468+
if opName, ok := GetInternalOpName(ctx); ok {
4469+
labels = append(labels, "opname", opName)
4470+
}
4471+
pprofutil.Do(
4472+
ctx,
4473+
func(ctx context.Context) {
4474+
err = op(ctx)
4475+
},
4476+
labels...,
44684477
)
44694478
} else {
44704479
err = op(ctx)

0 commit comments

Comments
 (0)