mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) and [github.com/kubernetes-csi/csi-lib-utils](https://github.com/kubernetes-csi/csi-lib-utils). Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.33.15 to 1.33.16 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/sns/v1.33.15...service/sns/v1.33.16) Updates `github.com/kubernetes-csi/csi-lib-utils` from 0.20.0 to 0.21.0 - [Release notes](https://github.com/kubernetes-csi/csi-lib-utils/releases) - [Commits](https://github.com/kubernetes-csi/csi-lib-utils/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/kubernetes-csi/csi-lib-utils dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
106e32228f
commit
a80295bf8f
25
vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go
generated
vendored
25
vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go
generated
vendored
@ -25,6 +25,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"k8s.io/component-base/metrics"
|
||||
@ -91,6 +92,11 @@ type CSIMetricsManager interface {
|
||||
// value is defined in the metrics manager
|
||||
HaveAdditionalLabel(name string) bool
|
||||
|
||||
// WithAdditionalRegistry can be used to ensure additional non-CSI registries are served through RegisterToServer
|
||||
//
|
||||
// registry - Any registry which implements Gather() (e.g. metrics.KubeRegistry, prometheus.Registry, etc.)
|
||||
WithAdditionalRegistry(registry prometheus.Gatherer) CSIMetricsManager
|
||||
|
||||
// SetDriverName is called to update the CSI driver name. This should be done
|
||||
// as soon as possible, otherwise metrics recorded by this manager will be
|
||||
// recorded with an "unknown-driver" driver_name.
|
||||
@ -242,11 +248,6 @@ func NewCSIMetricsManagerWithOptions(driverName string, options ...MetricsManage
|
||||
// https://github.com/open-telemetry/opentelemetry-collector/issues/969
|
||||
// Add process_start_time_seconds into the metric to let the start time be parsed correctly
|
||||
metrics.RegisterProcessStartTime(cmm.registry.Register)
|
||||
// TODO: This is a bug in component-base library. We need to remove this after upgrade component-base dependency
|
||||
// BugFix: https://github.com/kubernetes/kubernetes/pull/96435
|
||||
// The first call to RegisterProcessStartTime can only create the metric, so we need a second call to actually
|
||||
// register the metric.
|
||||
metrics.RegisterProcessStartTime(cmm.registry.Register)
|
||||
}
|
||||
|
||||
labels := []string{labelCSIDriverName, labelCSIOperationName, labelGrpcStatusCode}
|
||||
@ -266,6 +267,9 @@ func NewCSIMetricsManagerWithOptions(driverName string, options ...MetricsManage
|
||||
)
|
||||
cmm.SetDriverName(driverName)
|
||||
cmm.registerMetrics()
|
||||
cmm.gatherers = prometheus.Gatherers{
|
||||
cmm.GetRegistry(),
|
||||
}
|
||||
return &cmm
|
||||
}
|
||||
|
||||
@ -278,6 +282,7 @@ type csiMetricsManager struct {
|
||||
driverName string
|
||||
additionalLabelNames []string
|
||||
additionalLabels []label
|
||||
gatherers prometheus.Gatherers
|
||||
csiOperationsLatencyMetric *metrics.HistogramVec
|
||||
registerProcessStartTime bool
|
||||
}
|
||||
@ -367,6 +372,14 @@ func (cmm *csiMetricsManager) HaveAdditionalLabel(name string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// WithAdditionalRegistry can be used to ensure additional non-CSI registries are served through RegisterToServer
|
||||
//
|
||||
// registry - Any registry which implements Gather() (e.g. metrics.KubeRegistry, prometheus.Registry, etc.)
|
||||
func (cmm *csiMetricsManager) WithAdditionalRegistry(registry prometheus.Gatherer) CSIMetricsManager {
|
||||
cmm.gatherers = append(cmm.gatherers, registry)
|
||||
return cmm
|
||||
}
|
||||
|
||||
// RecordMetrics passes the stored values as to the implementation.
|
||||
func (cmmv *csiMetricsManagerWithValues) RecordMetrics(
|
||||
operationName string,
|
||||
@ -390,7 +403,7 @@ func (cmm *csiMetricsManager) SetDriverName(driverName string) {
|
||||
// given server at the specified address/path.
|
||||
func (cmm *csiMetricsManager) RegisterToServer(s Server, metricsPath string) {
|
||||
s.Handle(metricsPath, metrics.HandlerFor(
|
||||
cmm.GetRegistry(),
|
||||
cmm.gatherers,
|
||||
metrics.HandlerOpts{
|
||||
ErrorHandling: metrics.ContinueOnError}))
|
||||
}
|
||||
|
Reference in New Issue
Block a user