Skip to content

Commit

Permalink
private/ecclient: remove piece-upload event
Browse files Browse the repository at this point in the history
this is way too much data for us to write to
eventkit/bigquery

Change-Id: Ia3fecd50c408c8e1a8e51f5823217e10d3df142a
  • Loading branch information
jtolio committed Jul 11, 2024
1 parent 2015256 commit 608581a
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions private/ecclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ import (
"storj.io/common/ranger"
"storj.io/common/rpc"
"storj.io/common/storj"
"storj.io/eventkit"
"storj.io/uplink/private/eestream"
"storj.io/uplink/private/piecestore"
)

var mon = monkit.Package()
var evs = eventkit.Package()

// GetOptions is a struct of options for GetWithOptions.
type GetOptions struct {
Expand Down Expand Up @@ -219,33 +217,7 @@ func (ec *ecClient) PutPiece(ctx, parent context.Context, limit *pb.AddressedOrd

storageNodeID := limit.GetLimit().StorageNodeId
defer mon.Task()(&ctx, "node: "+storageNodeID.String()[0:8])(&err)
start := time.Now()
measuredReader := countingReader{R: data}
defer func() {
var errstr string
if err != nil {
errstr = err.Error()
}
var pieceSize int64
var pieceTimestamp time.Time
var hashAlgo int64
if hash != nil {
pieceSize = hash.PieceSize
pieceTimestamp = hash.Timestamp
hashAlgo = int64(hash.HashAlgorithm)
}
evs.Event("piece-upload",
eventkit.Bytes("node_id", storageNodeID.Bytes()),
eventkit.Bytes("piece_id", limit.GetLimit().PieceId.Bytes()),
eventkit.Duration("upload_time", time.Since(start)),
eventkit.Bool("success", err == nil),
eventkit.String("error", errstr),
eventkit.Int64("bytes", measuredReader.N),
eventkit.Int64("piece_size", pieceSize),
eventkit.Timestamp("piece_timestamp", pieceTimestamp),
eventkit.Int64("hash_algo", hashAlgo),
)
}()
defer func() { err = errs.Combine(err, data.Close()) }()

ps, err := ec.dialPiecestore(ctx, limitToNodeURL(limit))
Expand Down

0 comments on commit 608581a

Please sign in to comment.