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:
dependabot[bot]
2024-09-23 20:18:36 +00:00
committed by mergify[bot]
parent dbd8462bcc
commit 40ad4163cb
45 changed files with 1296 additions and 98 deletions

96
vendor/github.com/aws/smithy-go/tracing/context.go generated vendored Normal file
View File

@ -0,0 +1,96 @@
package tracing
import "context"
type (
operationTracerKey struct{}
spanLineageKey struct{}
)
// GetSpan returns the active trace Span on the context.
//
// The boolean in the return indicates whether a Span was actually in the
// context, but a no-op implementation will be returned if not, so callers
// can generally disregard the boolean unless they wish to explicitly confirm
// presence/absence of a Span.
func GetSpan(ctx context.Context) (Span, bool) {
lineage := getLineage(ctx)
if len(lineage) == 0 {
return nopSpan{}, false
}
return lineage[len(lineage)-1], true
}
// WithSpan sets the active trace Span on the context.
func WithSpan(parent context.Context, span Span) context.Context {
lineage := getLineage(parent)
if len(lineage) == 0 {
return context.WithValue(parent, spanLineageKey{}, []Span{span})
}
lineage = append(lineage, span)
return context.WithValue(parent, spanLineageKey{}, lineage)
}
// PopSpan pops the current Span off the context, setting the active Span on
// the returned Context back to its parent and returning the REMOVED one.
//
// PopSpan on a context with no active Span will return a no-op instance.
//
// This is mostly necessary for the runtime to manage base trace spans due to
// the wrapped-function nature of the middleware stack. End-users of Smithy
// clients SHOULD NOT generally be using this API.
func PopSpan(parent context.Context) (context.Context, Span) {
lineage := getLineage(parent)
if len(lineage) == 0 {
return parent, nopSpan{}
}
span := lineage[len(lineage)-1]
lineage = lineage[:len(lineage)-1]
return context.WithValue(parent, spanLineageKey{}, lineage), span
}
func getLineage(ctx context.Context) []Span {
v := ctx.Value(spanLineageKey{})
if v == nil {
return nil
}
return v.([]Span)
}
// GetOperationTracer returns the embedded operation-scoped Tracer on a
// Context.
//
// The boolean in the return indicates whether a Tracer was actually in the
// context, but a no-op implementation will be returned if not, so callers
// can generally disregard the boolean unless they wish to explicitly confirm
// presence/absence of a Tracer.
func GetOperationTracer(ctx context.Context) (Tracer, bool) {
v := ctx.Value(operationTracerKey{})
if v == nil {
return nopTracer{}, false
}
return v.(Tracer), true
}
// WithOperationTracer returns a child Context embedding the given Tracer.
//
// The runtime will use this embed a scoped tracer for client operations,
// Smithy/SDK client callers DO NOT need to do this explicitly.
func WithOperationTracer(parent context.Context, tracer Tracer) context.Context {
return context.WithValue(parent, operationTracerKey{}, tracer)
}
// StartSpan is a convenience API for creating tracing Spans from a Context.
//
// StartSpan uses the operation-scoped Tracer, previously stored using
// [WithOperationTracer], to start the Span. If a Tracer has not been embedded
// the returned Span will be a no-op implementation.
func StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) {
tracer, _ := GetOperationTracer(ctx)
return tracer.StartSpan(ctx, name, opts...)
}

32
vendor/github.com/aws/smithy-go/tracing/nop.go generated vendored Normal file
View File

@ -0,0 +1,32 @@
package tracing
import "context"
// NopTracerProvider is a no-op tracing implementation.
type NopTracerProvider struct{}
var _ TracerProvider = (*NopTracerProvider)(nil)
// Tracer returns a tracer which creates no-op spans.
func (NopTracerProvider) Tracer(string, ...TracerOption) Tracer {
return nopTracer{}
}
type nopTracer struct{}
var _ Tracer = (*nopTracer)(nil)
func (nopTracer) StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) {
return ctx, nopSpan{}
}
type nopSpan struct{}
var _ Span = (*nopSpan)(nil)
func (nopSpan) Name() string { return "" }
func (nopSpan) Context() SpanContext { return SpanContext{} }
func (nopSpan) AddEvent(string, ...EventOption) {}
func (nopSpan) SetProperty(any, any) {}
func (nopSpan) SetStatus(SpanStatus) {}
func (nopSpan) End() {}

95
vendor/github.com/aws/smithy-go/tracing/tracing.go generated vendored Normal file
View File

@ -0,0 +1,95 @@
// Package tracing defines tracing APIs to be used by Smithy clients.
package tracing
import (
"context"
"github.com/aws/smithy-go"
)
// SpanStatus records the "success" state of an observed span.
type SpanStatus int
// Enumeration of SpanStatus.
const (
SpanStatusUnset SpanStatus = iota
SpanStatusOK
SpanStatusError
)
// SpanKind indicates the nature of the work being performed.
type SpanKind int
// Enumeration of SpanKind.
const (
SpanKindInternal SpanKind = iota
SpanKindClient
SpanKindServer
SpanKindProducer
SpanKindConsumer
)
// TracerProvider is the entry point for creating client traces.
type TracerProvider interface {
Tracer(scope string, opts ...TracerOption) Tracer
}
// TracerOption applies configuration to a tracer.
type TracerOption func(o *TracerOptions)
// TracerOptions represent configuration for tracers.
type TracerOptions struct {
Properties smithy.Properties
}
// Tracer is the entry point for creating observed client Spans.
//
// Spans created by tracers propagate by existing on the Context. Consumers of
// the API can use [GetSpan] to pull the active Span from a Context.
//
// Creation of child Spans is implicit through Context persistence. If
// CreateSpan is called with a Context that holds a Span, the result will be a
// child of that Span.
type Tracer interface {
StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span)
}
// SpanOption applies configuration to a span.
type SpanOption func(o *SpanOptions)
// SpanOptions represent configuration for span events.
type SpanOptions struct {
Kind SpanKind
Properties smithy.Properties
}
// Span records a conceptually individual unit of work that takes place in a
// Smithy client operation.
type Span interface {
Name() string
Context() SpanContext
AddEvent(name string, opts ...EventOption)
SetStatus(status SpanStatus)
SetProperty(k, v any)
End()
}
// EventOption applies configuration to a span event.
type EventOption func(o *EventOptions)
// EventOptions represent configuration for span events.
type EventOptions struct {
Properties smithy.Properties
}
// SpanContext uniquely identifies a Span.
type SpanContext struct {
TraceID string
SpanID string
IsRemote bool
}
// IsValid is true when a span has nonzero trace and span IDs.
func (ctx *SpanContext) IsValid() bool {
return len(ctx.TraceID) != 0 && len(ctx.SpanID) != 0
}