-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit additional metrics on replicate blobs and refresh blobs #226
Emit additional metrics on replicate blobs and refresh blobs #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. Really appreciated!
|
||
// NewMetricsBlobReplicator creates a wrapper around BlobReplicator that adds | ||
// Prometheus metrics for monitoring replication operations. | ||
func NewMetricsBlobReplicator(replicator BlobReplicator, clock clock.Clock) BlobReplicator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now these metrics aren't broken down by backend/storage type. Is that intentional? If not, maybe we can simply use the backend type of the BlobAccess that they are used in conjunction with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added storage type, I didn't see a good way to extract backendType from blobAccess though.
@@ -27,7 +27,7 @@ func NewCASBlobReplicatorCreator(grpcClientFactory grpc.ClientFactory) BlobRepli | |||
func (brc *casBlobReplicatorCreator) NewCustomBlobReplicator(configuration *pb.BlobReplicatorConfiguration, source blobstore.BlobAccess, sink BlobAccessInfo) (replication.BlobReplicator, error) { | |||
switch mode := configuration.Mode.(type) { | |||
case *pb.BlobReplicatorConfiguration_Deduplicating: | |||
base, err := NewBlobReplicatorFromConfiguration(mode.Deduplicating, source, sink, brc) | |||
base, err := NewBlobReplicatorFromConfiguration(mode.Deduplicating, source, sink, brc, "cas") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better if we move GetStorageTypeName()
to implementations of BlobReplicatorCreator
? Because then we can call that function from here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, moved it there.
Thanks a lot, @kevinye202. You're a rockstar! |
This pr adds several more metrics to replicate blobs and refresh blobs, specifically batch size and blob size in bytes as well as latency, which would provide more insight in the event of slowness in findMissing and replication.