Skip to content

Commit 8a2172c

Browse files
committed
Add retry info to tracing event and hook data
1 parent 17660a4 commit 8a2172c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cmd/run.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,10 @@ var runCmd = &cobra.Command{
552552
attribute.String("tcpKeepAlivePeriod", client.TCPKeepAlivePeriod.String()),
553553
attribute.String("localAddress", client.LocalAddr()),
554554
attribute.String("remoteAddress", client.RemoteAddr()),
555+
attribute.Int("retries", clientConfig.Retries),
556+
attribute.String("backoff", clientConfig.GetBackoff().String()),
557+
attribute.Float64("backoffMultiplier", clientConfig.BackoffMultiplier),
558+
attribute.Bool("disableBackoffCaps", clientConfig.DisableBackoffCaps),
555559
)
556560
if client.ID != "" {
557561
eventOptions = trace.WithAttributes(
@@ -578,6 +582,10 @@ var runCmd = &cobra.Command{
578582
"tcpKeepAlivePeriod": client.TCPKeepAlivePeriod.String(),
579583
"localAddress": client.LocalAddr(),
580584
"remoteAddress": client.RemoteAddr(),
585+
"retries": clientConfig.Retries,
586+
"backoff": clientConfig.GetBackoff().String(),
587+
"backoffMultiplier": clientConfig.BackoffMultiplier,
588+
"disableBackoffCaps": clientConfig.DisableBackoffCaps,
581589
}
582590
_, err := pluginRegistry.Run(
583591
pluginTimeoutCtx, clientCfg, v1.HookName_HOOK_NAME_ON_NEW_CLIENT)

gatewayd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ clients:
4444
# Retry configuration
4545
retries: 3 # 0 means no retry
4646
backoff: 1s # duration
47-
backoffMultiplier: 2 # 0 means no backoff
47+
backoffMultiplier: 2.0 # 0 means no backoff
4848
disableBackoffCaps: false
4949

5050
pools:

0 commit comments

Comments
 (0)