Skip to content

Commit

Permalink
In practice bigtable latency is often more than 1 s, adding more buck…
Browse files Browse the repository at this point in the history
…ets to better display this. Also updated the dynamodb and cassandra clients to have the same buckets for consistency. (grafana#2091)

Signed-off-by: Edward Welch <edward.welch@grafana.com>
  • Loading branch information
slim-bean authored Feb 11, 2020
1 parent a633c1c commit 20395b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions aws/dynamodb_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ var (
Name: "dynamo_request_duration_seconds",
Help: "Time spent doing DynamoDB requests.",

// DynamoDB latency seems to range from a few ms to a few sec and is
// important. So use 8 buckets from 128us to 2s.
Buckets: prometheus.ExponentialBuckets(0.000128, 4, 8),
// DynamoDB latency seems to range from a few ms to a several seconds and is
// important. So use 9 buckets from 1ms to just over 1 minute (65s).
Buckets: prometheus.ExponentialBuckets(0.001, 4, 9),
}, []string{"operation", "status_code"}))
dynamoConsumedCapacity = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: "cortex",
Expand Down
2 changes: 1 addition & 1 deletion cassandra/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var requestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Namespace: "cortex",
Name: "cassandra_request_duration_seconds",
Help: "Time spent doing Cassandra requests.",
Buckets: prometheus.ExponentialBuckets(0.001, 4, 6),
Buckets: prometheus.ExponentialBuckets(0.001, 4, 9),
}, []string{"operation", "status_code"})

func init() {
Expand Down
6 changes: 3 additions & 3 deletions gcp/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ var (
Name: "bigtable_request_duration_seconds",
Help: "Time spent doing Bigtable requests.",

// Bigtable latency seems to range from a few ms to a few hundred ms and is
// important. So use 6 buckets from 1ms to 1s.
Buckets: prometheus.ExponentialBuckets(0.001, 4, 6),
// Bigtable latency seems to range from a few ms to a several seconds and is
// important. So use 9 buckets from 1ms to just over 1 minute (65s).
Buckets: prometheus.ExponentialBuckets(0.001, 4, 9),
}, []string{"operation", "status_code"})

gcsRequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
Expand Down

0 comments on commit 20395b4

Please sign in to comment.