-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the following metrics: - `kv.streamer.operators.active` tracks how many active streamer operators are out there currently - `kv.streamer.batches.count` tracks total number of BatchRequests sent by all streamer instances - `kv.streamer.batches.in_progress` tracks how many BatchRequests are in flight currently, across all streamer instances - `kv.streamer.batches.throttled` tracks how many BatchRequests are being currently throttled (queued) due to reaching the streamer concurrency limit, across all streamer instances. It also includes a couple of recently added dist sender metrics into roachprod opentelemetry registry. Release note: None
- Loading branch information
1 parent
fd2fec8
commit 568266c
Showing
14 changed files
with
106 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2024 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the CockroachDB Software License | ||
// included in the /LICENSE file. | ||
|
||
package kvstreamer | ||
|
||
import "github.com/cockroachdb/cockroach/pkg/util/metric" | ||
|
||
var ( | ||
metaStreamerCount = metric.Metadata{ | ||
Name: "kv.streamer.operators.active", | ||
Help: "Number of KV Streamer operators currently in use", | ||
Measurement: "Operators", | ||
Unit: metric.Unit_COUNT, | ||
} | ||
metaBatchesSent = metric.Metadata{ | ||
Name: "kv.streamer.batches.sent", | ||
Help: "Number of BatchRequests sent across all KV Streamer operators", | ||
Measurement: "Batches", | ||
Unit: metric.Unit_COUNT, | ||
} | ||
metaBatchesInProgress = metric.Metadata{ | ||
Name: "kv.streamer.batches.in_progress", | ||
Help: "Number of BatchRequests in progress across all KV Streamer operators", | ||
Measurement: "Batches", | ||
Unit: metric.Unit_COUNT, | ||
} | ||
metaBatchesThrottled = metric.Metadata{ | ||
Name: "kv.streamer.batches.throttled", | ||
Help: "Number of BatchRequests currently being throttled due to reaching the concurrency limit, across all KV Streamer operators", | ||
Measurement: "Batches", | ||
Unit: metric.Unit_COUNT, | ||
} | ||
) | ||
|
||
type Metrics struct { | ||
OperatorsCount *metric.Gauge | ||
BatchesSent *metric.Counter | ||
BatchesInProgress *metric.Gauge | ||
BatchesThrottled *metric.Gauge | ||
} | ||
|
||
var _ metric.Struct = Metrics{} | ||
|
||
func (Metrics) MetricStruct() {} | ||
|
||
func MakeMetrics() Metrics { | ||
return Metrics{ | ||
OperatorsCount: metric.NewGauge(metaStreamerCount), | ||
BatchesSent: metric.NewCounter(metaBatchesSent), | ||
BatchesInProgress: metric.NewGauge(metaBatchesInProgress), | ||
BatchesThrottled: metric.NewGauge(metaBatchesThrottled), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters