|
27 | 27 | Help: "Amount of time spent per operation on blob replicator, in seconds.",
|
28 | 28 | Buckets: util.DecimalExponentialBuckets(-3, 6, 2),
|
29 | 29 | },
|
30 |
| - []string{"operation"}) |
| 30 | + []string{"storage_type", "operation"}) |
31 | 31 |
|
32 | 32 | blobReplicatorOperationsBlobSizeBytes = prometheus.NewHistogramVec(
|
33 | 33 | prometheus.HistogramOpts{
|
|
37 | 37 | Help: "Size of blobs being replicated, in bytes.",
|
38 | 38 | Buckets: prometheus.ExponentialBuckets(1.0, 2.0, 33),
|
39 | 39 | },
|
40 |
| - []string{"operation"}) |
| 40 | + []string{"storage_type", "operation"}) |
41 | 41 |
|
42 | 42 | blobReplicatorOperationsBatchSize = prometheus.NewHistogramVec(
|
43 | 43 | prometheus.HistogramOpts{
|
|
47 | 47 | Help: "Number of blobs in batch replication requests.",
|
48 | 48 | Buckets: prometheus.ExponentialBuckets(1.0, 2.0, 17),
|
49 | 49 | },
|
50 |
| - []string{"operation"}) |
| 50 | + []string{"storage_type", "operation"}) |
51 | 51 | )
|
52 | 52 |
|
53 | 53 | type metricsBlobReplicator struct {
|
@@ -78,21 +78,21 @@ func NewMetricsBlobReplicator(replicator BlobReplicator, clock clock.Clock, stor
|
78 | 78 | replicator: replicator,
|
79 | 79 | clock: clock,
|
80 | 80 | singleDurationSeconds: blobReplicatorOperationsDurationSeconds.MustCurryWith(map[string]string{
|
81 |
| - "operation": "ReplicateSingle", |
82 |
| - "storage": storageTypeName, |
| 81 | + "storage_type": storageTypeName, |
| 82 | + "operation": "ReplicateSingle", |
83 | 83 | }),
|
84 |
| - singleBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues("ReplicateSingle", storageTypeName), |
| 84 | + singleBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues(storageTypeName, "ReplicateSingle"), |
85 | 85 | compositeDurationSeconds: blobReplicatorOperationsDurationSeconds.MustCurryWith(map[string]string{
|
86 |
| - "operation": "ReplicateComposite", |
87 |
| - "storage": storageTypeName, |
| 86 | + "storage_type": storageTypeName, |
| 87 | + "operation": "ReplicateComposite", |
88 | 88 | }),
|
89 |
| - compositeBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues("ReplicateComposite", storageTypeName), |
| 89 | + compositeBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues(storageTypeName, "ReplicateComposite"), |
90 | 90 | multipleDurationSeconds: blobReplicatorOperationsDurationSeconds.MustCurryWith(map[string]string{
|
91 |
| - "operation": "ReplicateMultiple", |
92 |
| - "storage": storageTypeName, |
| 91 | + "storage_type": storageTypeName, |
| 92 | + "operation": "ReplicateMultiple", |
93 | 93 | }),
|
94 |
| - multipleBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues("ReplicateMultiple", storageTypeName), |
95 |
| - multipleBatchSize: blobReplicatorOperationsBatchSize.WithLabelValues("ReplicateMultiple", storageTypeName), |
| 94 | + multipleBlobSizeBytes: blobReplicatorOperationsBlobSizeBytes.WithLabelValues(storageTypeName, "ReplicateMultiple"), |
| 95 | + multipleBatchSize: blobReplicatorOperationsBatchSize.WithLabelValues(storageTypeName, "ReplicateMultiple"), |
96 | 96 | }
|
97 | 97 | }
|
98 | 98 |
|
|
0 commit comments