Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 26, 2024
1 parent 456ef75 commit 9a4de70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut
return nil, api.NewInvalidArgError(err.Error())
}

s.logger.Debug("received a new blob before rate limit", "authenticatedAddress", authenticatedAddress, "origin", origin, "blob Size", blobSize)

s.logger.Debug("received a new blob dispersal request", "authenticatedAddress", authenticatedAddress, "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", "))

if s.ratelimiter != nil {
Expand Down
4 changes: 2 additions & 2 deletions tools/traffic/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ func (g *TrafficGenerator) sendRequest(ctx context.Context, data []byte) error {
return err
}

g.Logger.Info("successfully dispersed new blob", "authenticated", true, "key", hex.EncodeToString(key), "status", blobStatus.String())
g.Logger.Info("successfully dispersed new blob", "authenticated", true, "key", hex.EncodeToString(key), "status", blobStatus.String(), "size", len(data))
return nil
} else {
blobStatus, key, err := g.DisperserClient.DisperseBlob(ctxTimeout, data, g.Config.CustomQuorums)
if err != nil {
return err
}

g.Logger.Info("successfully dispersed new blob", "authenticated", false, "key", hex.EncodeToString(key), "status", blobStatus.String())
g.Logger.Info("successfully dispersed new blob", "authenticated", false, "key", hex.EncodeToString(key), "status", blobStatus.String(), "size", len(data))
return nil
}

Expand Down

0 comments on commit 9a4de70

Please sign in to comment.