Skip to content

Commit 6c77a9e

Browse files
suj-krishnanCopilot
andcommitted
fixup! drpcpool: add support for ShouldRecord
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e806f5a commit 6c77a9e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drpcclient/dialoptions.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ type dialOptions struct {
3333
// tlsConfig is an optional TLS configuration for secure connections.
3434
tlsConfig *tls.Config
3535

36-
// metrics holds optional metrics the conn will populate. If nil, no
37-
// metrics are recorded.
36+
// metrics holds optional metrics the conn will populate. No metrics are
37+
// recorded if this is nil. When shouldRecord is set, metrics are recorded
38+
// only when shouldRecord returns true.
3839
metrics *drpcmetrics.ClientMetrics
3940
shouldRecord func() bool
4041
}

0 commit comments

Comments
 (0)