Skip to content

Commit ac2c4e5

Browse files
committed
feat(fibre): log per-Submit upload duration
The Fibre Submit path was opaque: failures showed up as DeadlineExceeded with no signal of how long the upload actually took, and successes only logged at debug level inside the upstream library. During load-test debugging this turned into a guessing game — was the cluster slow, the deadline too tight, or something stuck mid-RPC? Add a single info-level (warn-on-failure) log line in fiberDAClient.Submit covering the Upload call: duration, flat blob bytes, blob count. Cheap (one time.Since) and gives the operator concrete numbers — e.g. "17 blobs / 115 MiB / 1.5 s" — to reason about whether RPCTimeout, pending cap, or batch sizing is the right knob to turn next.
1 parent 91089a5 commit ac2c4e5

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

block/internal/da/fiber_client.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,23 @@ func (c *fiberDAClient) Submit(ctx context.Context, data [][]byte, _ float64, na
8989

9090
flat := flattenBlobs(data)
9191
nsID := namespace[len(namespace)-10:]
92+
uploadStart := time.Now()
9293
result, err := c.fiber.Upload(context.Background(), nsID, flat)
94+
uploadDuration := time.Since(uploadStart)
95+
if err != nil {
96+
c.logger.Warn().
97+
Dur("duration", uploadDuration).
98+
Int("flat_size", len(flat)).
99+
Int("blob_count", len(data)).
100+
Err(err).
101+
Msg("fiber upload duration (failed)")
102+
} else {
103+
c.logger.Info().
104+
Dur("duration", uploadDuration).
105+
Int("flat_size", len(flat)).
106+
Int("blob_count", len(data)).
107+
Msg("fiber upload duration (ok)")
108+
}
93109
if err != nil {
94110
code := datypes.StatusError
95111
switch {

0 commit comments

Comments
 (0)