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/prometheus/client_golang](https://github.com/prometheus/client_golang). Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.30.7 to 1.31.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.31.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/mgn/v1.30.7...service/s3/v1.31.1) Updates `github.com/prometheus/client_golang` from 1.20.3 to 1.20.4 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
dbd8462bcc
commit
40ad4163cb
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.30.5"
|
||||
const goModuleVersion = "1.31.0"
|
||||
|
4
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
@ -45,6 +46,9 @@ func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middlewar
|
||||
if v := resp.Header.Get(h); len(v) != 0 {
|
||||
// set reqID on metadata for successful responses.
|
||||
SetRequestIDMetadata(&metadata, v)
|
||||
|
||||
span, _ := tracing.GetSpan(ctx)
|
||||
span.SetProperty("aws.request_id", v)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
51
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go
generated
vendored
Normal file
51
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
package retry
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/aws/smithy-go/metrics"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
type attemptMetrics struct {
|
||||
Attempts metrics.Int64Counter
|
||||
Errors metrics.Int64Counter
|
||||
|
||||
AttemptDuration metrics.Float64Histogram
|
||||
}
|
||||
|
||||
func newAttemptMetrics(meter metrics.Meter) (*attemptMetrics, error) {
|
||||
m := &attemptMetrics{}
|
||||
var err error
|
||||
|
||||
m.Attempts, err = meter.Int64Counter("client.call.attempts", func(o *metrics.InstrumentOptions) {
|
||||
o.UnitLabel = "{attempt}"
|
||||
o.Description = "The number of attempts for an individual operation"
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m.Errors, err = meter.Int64Counter("client.call.errors", func(o *metrics.InstrumentOptions) {
|
||||
o.UnitLabel = "{error}"
|
||||
o.Description = "The number of errors for an operation"
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m.AttemptDuration, err = meter.Float64Histogram("client.call.attempt_duration", func(o *metrics.InstrumentOptions) {
|
||||
o.UnitLabel = "s"
|
||||
o.Description = "The time it takes to connect to the service, send the request, and get back HTTP status code and headers (including time queued waiting to be sent)"
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
|
||||
return func(o *metrics.RecordMetricOptions) {
|
||||
o.Properties.Set("rpc.service", middleware.GetServiceID(ctx))
|
||||
o.Properties.Set("rpc.method", middleware.GetOperationName(ctx))
|
||||
}
|
||||
}
|
47
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
47
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
@ -8,14 +8,17 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
privatemetrics "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
|
||||
"github.com/aws/smithy-go"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/metrics"
|
||||
smithymiddle "github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
"github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
@ -38,6 +41,9 @@ type Attempt struct {
|
||||
// attempts are reached.
|
||||
LogAttempts bool
|
||||
|
||||
// A Meter instance for recording retry-related metrics.
|
||||
OperationMeter metrics.Meter
|
||||
|
||||
retryer aws.RetryerV2
|
||||
requestCloner RequestCloner
|
||||
}
|
||||
@ -55,6 +61,10 @@ func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optF
|
||||
for _, fn := range optFns {
|
||||
fn(m)
|
||||
}
|
||||
if m.OperationMeter == nil {
|
||||
m.OperationMeter = metrics.NopMeterProvider{}.Meter("")
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
@ -80,6 +90,11 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
maxAttempts := r.retryer.MaxAttempts()
|
||||
releaseRetryToken := nopRelease
|
||||
|
||||
retryMetrics, err := newAttemptMetrics(r.OperationMeter)
|
||||
if err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
|
||||
for {
|
||||
attemptNum++
|
||||
attemptInput := in
|
||||
@ -97,7 +112,25 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew)
|
||||
|
||||
var attemptResult AttemptResult
|
||||
|
||||
attemptCtx, span := tracing.StartSpan(attemptCtx, "Attempt", func(o *tracing.SpanOptions) {
|
||||
o.Properties.Set("operation.attempt", attemptNum)
|
||||
})
|
||||
retryMetrics.Attempts.Add(ctx, 1, withOperationMetadata(ctx))
|
||||
|
||||
start := sdk.NowTime()
|
||||
out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
|
||||
elapsed := sdk.NowTime().Sub(start)
|
||||
|
||||
retryMetrics.AttemptDuration.Record(ctx, float64(elapsed)/1e9, withOperationMetadata(ctx))
|
||||
if err != nil {
|
||||
retryMetrics.Errors.Add(ctx, 1, withOperationMetadata(ctx), func(o *metrics.RecordMetricOptions) {
|
||||
o.Properties.Set("exception.type", errorType(err))
|
||||
})
|
||||
}
|
||||
|
||||
span.End()
|
||||
|
||||
attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
|
||||
|
||||
// AttemptResult Retried states that the attempt was not successful, and
|
||||
@ -238,7 +271,7 @@ func (r *Attempt) handleAttempt(
|
||||
// that time. Potentially early exist if the sleep is canceled via the
|
||||
// context.
|
||||
retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err)
|
||||
mctx := metrics.Context(ctx)
|
||||
mctx := privatemetrics.Context(ctx)
|
||||
if mctx != nil {
|
||||
attempt, err := mctx.Data().LatestAttempt()
|
||||
if err != nil {
|
||||
@ -381,3 +414,13 @@ func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresO
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Determines the value of exception.type for metrics purposes. We prefer an
|
||||
// API-specific error code, otherwise it's just the Go type for the value.
|
||||
func errorType(err error) string {
|
||||
var terr smithy.APIError
|
||||
if errors.As(err, &terr) {
|
||||
return terr.ErrorCode()
|
||||
}
|
||||
return fmt.Sprintf("%T", err)
|
||||
}
|
||||
|
5
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
5
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
@ -15,6 +15,7 @@ import (
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
@ -161,6 +162,9 @@ func (m *ComputePayloadSHA256) HandleFinalize(
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
_, span := tracing.StartSpan(ctx, "ComputePayloadSHA256")
|
||||
defer span.End()
|
||||
|
||||
req, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &HashComputationError{
|
||||
@ -186,6 +190,7 @@ func (m *ComputePayloadSHA256) HandleFinalize(
|
||||
|
||||
ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil)))
|
||||
|
||||
span.End()
|
||||
return next.HandleFinalize(ctx, in)
|
||||
}
|
||||
|
||||
|
36
vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
generated
vendored
36
vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
generated
vendored
@ -1,13 +1,16 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"net"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/smithy-go/tracing"
|
||||
)
|
||||
|
||||
// Defaults for the HTTPTransportBuilder.
|
||||
@ -179,7 +182,7 @@ func defaultHTTPTransport() *http.Transport {
|
||||
|
||||
tr := &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: dialer.DialContext,
|
||||
DialContext: traceDialContext(dialer.DialContext),
|
||||
TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout,
|
||||
MaxIdleConns: DefaultHTTPTransportMaxIdleConns,
|
||||
MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost,
|
||||
@ -194,6 +197,35 @@ func defaultHTTPTransport() *http.Transport {
|
||||
return tr
|
||||
}
|
||||
|
||||
type dialContext func(ctx context.Context, network, addr string) (net.Conn, error)
|
||||
|
||||
func traceDialContext(dc dialContext) dialContext {
|
||||
return func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
span, _ := tracing.GetSpan(ctx)
|
||||
span.SetProperty("net.peer.name", addr)
|
||||
|
||||
conn, err := dc(ctx, network, addr)
|
||||
if err != nil {
|
||||
return conn, err
|
||||
}
|
||||
|
||||
raddr := conn.RemoteAddr()
|
||||
if raddr == nil {
|
||||
return conn, err
|
||||
}
|
||||
|
||||
host, port, err := net.SplitHostPort(raddr.String())
|
||||
if err != nil { // don't blow up just because we couldn't parse
|
||||
span.SetProperty("net.peer.addr", raddr.String())
|
||||
} else {
|
||||
span.SetProperty("net.peer.host", host)
|
||||
span.SetProperty("net.peer.port", port)
|
||||
}
|
||||
|
||||
return conn, err
|
||||
}
|
||||
}
|
||||
|
||||
// shallowCopyStruct creates a shallow copy of the passed in source struct, and
|
||||
// returns that copy of the same struct type.
|
||||
func shallowCopyStruct(src interface{}) interface{} {
|
||||
|
Reference in New Issue
Block a user