Skip to content

Commit

Permalink
sql: hack to avoid tracing all BEGIN/COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Nov 18, 2024
1 parent 3d083fe commit 3d5d017
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ func (ih *instrumentationHelper) Setup(

var previouslySampled bool
previouslySampled, ih.savePlanForStats = statsCollector.ShouldSample(fingerprint, implicitTxn, p.SessionData().Database)
if !previouslySampled && (fingerprint == "BEGIN TRANSACTION" || fingerprint == "COMMIT TRANSACTION") {
previouslySampled = true
}

defer func() { ih.finalizeSetup(newCtx, cfg) }()

Expand Down

0 comments on commit 3d5d017

Please sign in to comment.