Skip to content

Commit

Permalink
add datadog stats for compaction (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
a9kitkumarsinha authored Jun 2, 2020
1 parent 3888dee commit d233adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/server/server_ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ func (s *Server) Ingest(ctx context.Context, request *talaria.IngestRequest) (*t
}
}

s.monitor.Count("server", "ingestCount", int64(len(blocks)))
return nil, nil
}
3 changes: 3 additions & 0 deletions internal/storage/compact/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
// Assert contract compliance
var _ storage.Storage = new(Storage)

const ctxTag = "compaction"

// Storage represents compactor storage.
type Storage struct {
compact async.Task // The compaction worker
Expand Down Expand Up @@ -160,6 +162,7 @@ func (s *Storage) merge(keys []key.Key, blocks []block.Block, schema typeof.Sche
if err = s.buffer.Delete(keys...); err != nil {
s.monitor.Error(err)
}
s.monitor.Count(ctxTag, "deleteCount", int64(len(keys)))
return
})
}
Expand Down

0 comments on commit d233adb

Please sign in to comment.