mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
rebase: update additional go.opentelemetry.io/otel modules
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
30150c3be9
commit
14b97c8192
8
go.mod
8
go.mod
@ -139,12 +139,12 @@ require (
|
||||
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect
|
||||
go.opentelemetry.io/otel v1.20.0 // indirect
|
||||
go.opentelemetry.io/otel v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.20.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.20.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.21.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.25.0 // indirect
|
||||
|
15
go.sum
15
go.sum
@ -1655,8 +1655,8 @@ go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M
|
||||
go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4=
|
||||
go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI=
|
||||
go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
|
||||
go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc=
|
||||
go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs=
|
||||
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=
|
||||
@ -1666,17 +1666,18 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h
|
||||
go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4=
|
||||
go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k=
|
||||
go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
|
||||
go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA=
|
||||
go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM=
|
||||
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
|
||||
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
||||
go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
|
||||
go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
||||
go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk=
|
||||
go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0=
|
||||
go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0=
|
||||
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
|
||||
go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ=
|
||||
go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU=
|
||||
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
|
||||
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg=
|
||||
go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||
|
4
vendor/go.opentelemetry.io/otel/.gitignore
generated
vendored
4
vendor/go.opentelemetry.io/otel/.gitignore
generated
vendored
@ -14,13 +14,9 @@ go.work.sum
|
||||
gen/
|
||||
|
||||
/example/dice/dice
|
||||
/example/fib/fib
|
||||
/example/fib/traces.txt
|
||||
/example/jaeger/jaeger
|
||||
/example/namedtracer/namedtracer
|
||||
/example/otel-collector/otel-collector
|
||||
/example/opencensus/opencensus
|
||||
/example/passthrough/passthrough
|
||||
/example/prometheus/prometheus
|
||||
/example/view/view
|
||||
/example/zipkin/zipkin
|
||||
|
17
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
17
vendor/go.opentelemetry.io/otel/CHANGELOG.md
generated
vendored
@ -8,6 +8,20 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.21.0/0.44.0] 2023-11-16
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708)
|
||||
- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719)
|
||||
- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719)
|
||||
|
||||
## [1.20.0/0.43.0] 2023-11-10
|
||||
|
||||
This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementors need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this.
|
||||
@ -2721,7 +2735,8 @@ It contains api and sdk for trace and meter.
|
||||
- CircleCI build CI manifest files.
|
||||
- CODEOWNERS file to track owners of this project.
|
||||
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.20.0...HEAD
|
||||
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...HEAD
|
||||
[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
|
||||
[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
|
||||
[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
|
||||
[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1
|
||||
|
4
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
4
vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
generated
vendored
@ -90,6 +90,10 @@ git push <YOUR_FORK> <YOUR_BRANCH_NAME>
|
||||
Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull
|
||||
request ID to the entry you added to `CHANGELOG.md`.
|
||||
|
||||
Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request.
|
||||
Rewriting Git history makes it difficult to keep track of iterations during code review.
|
||||
All pull requests are squashed to a single commit upon merge to `main`.
|
||||
|
||||
### How to Receive Comments
|
||||
|
||||
* If the PR is not ready for review, please put `[WIP]` in the title,
|
||||
|
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
@ -21,12 +21,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
ErrPartialResource = errors.New("partial resource")
|
||||
)
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
var ErrPartialResource = errors.New("partial resource")
|
||||
|
||||
// Detector detects OpenTelemetry resource information.
|
||||
type Detector interface {
|
||||
|
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
@ -28,16 +28,14 @@ import (
|
||||
|
||||
const (
|
||||
// resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from.
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES"
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials
|
||||
|
||||
// svcNameKey is the environment variable name that Service Name information will be read from.
|
||||
svcNameKey = "OTEL_SERVICE_NAME"
|
||||
)
|
||||
|
||||
var (
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
)
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
|
||||
// fromEnv is a Detector that implements the Detector and collects
|
||||
// resources from environment. This Detector is included as a
|
||||
@ -91,7 +89,7 @@ func constructOTResources(s string) (*Resource, error) {
|
||||
continue
|
||||
}
|
||||
key := strings.TrimSpace(k)
|
||||
val, err := url.QueryUnescape(strings.TrimSpace(v))
|
||||
val, err := url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
// Retain original value if decoding fails, otherwise it will be
|
||||
// an empty string.
|
||||
|
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
@ -36,8 +36,10 @@ func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) {
|
||||
osDescription = osDescriptionProvider
|
||||
}
|
||||
|
||||
type osTypeDetector struct{}
|
||||
type osDescriptionDetector struct{}
|
||||
type (
|
||||
osTypeDetector struct{}
|
||||
osDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the operating system type the
|
||||
// service is running on.
|
||||
@ -56,7 +58,6 @@ func (osTypeDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
// service is running on.
|
||||
func (osDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
description, err := osDescription()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
@ -25,14 +25,16 @@ import (
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
)
|
||||
|
||||
type pidProvider func() int
|
||||
type executablePathProvider func() (string, error)
|
||||
type commandArgsProvider func() []string
|
||||
type ownerProvider func() (*user.User, error)
|
||||
type runtimeNameProvider func() string
|
||||
type runtimeVersionProvider func() string
|
||||
type runtimeOSProvider func() string
|
||||
type runtimeArchProvider func() string
|
||||
type (
|
||||
pidProvider func() int
|
||||
executablePathProvider func() (string, error)
|
||||
commandArgsProvider func() []string
|
||||
ownerProvider func() (*user.User, error)
|
||||
runtimeNameProvider func() string
|
||||
runtimeVersionProvider func() string
|
||||
runtimeOSProvider func() string
|
||||
runtimeArchProvider func() string
|
||||
)
|
||||
|
||||
var (
|
||||
defaultPidProvider pidProvider = os.Getpid
|
||||
@ -108,14 +110,16 @@ func setUserProviders(ownerProvider ownerProvider) {
|
||||
owner = ownerProvider
|
||||
}
|
||||
|
||||
type processPIDDetector struct{}
|
||||
type processExecutableNameDetector struct{}
|
||||
type processExecutablePathDetector struct{}
|
||||
type processCommandArgsDetector struct{}
|
||||
type processOwnerDetector struct{}
|
||||
type processRuntimeNameDetector struct{}
|
||||
type processRuntimeVersionDetector struct{}
|
||||
type processRuntimeDescriptionDetector struct{}
|
||||
type (
|
||||
processPIDDetector struct{}
|
||||
processExecutableNameDetector struct{}
|
||||
processExecutablePathDetector struct{}
|
||||
processCommandArgsDetector struct{}
|
||||
processOwnerDetector struct{}
|
||||
processRuntimeNameDetector struct{}
|
||||
processRuntimeVersionDetector struct{}
|
||||
processRuntimeDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the process identifier (PID) of the
|
||||
// executing process.
|
||||
|
8
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
8
vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
generated
vendored
@ -25,6 +25,8 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
"go.opentelemetry.io/otel/trace/noop"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -73,6 +75,8 @@ func (cfg tracerProviderConfig) MarshalLog() interface{} {
|
||||
// TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to
|
||||
// instrumentation so it can trace operational flow through a system.
|
||||
type TracerProvider struct {
|
||||
embedded.TracerProvider
|
||||
|
||||
mu sync.Mutex
|
||||
namedTracer map[instrumentation.Scope]*tracer
|
||||
spanProcessors atomic.Pointer[spanProcessorStates]
|
||||
@ -139,7 +143,7 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
|
||||
func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
|
||||
// This check happens before the mutex is acquired to avoid deadlocking if Tracer() is called from within Shutdown().
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...)
|
||||
return noop.NewTracerProvider().Tracer(name, opts...)
|
||||
}
|
||||
c := trace.NewTracerConfig(opts...)
|
||||
if name == "" {
|
||||
@ -157,7 +161,7 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T
|
||||
// Must check the flag after acquiring the mutex to avoid returning a valid tracer if Shutdown() ran
|
||||
// after the first check above but before we acquired the mutex.
|
||||
if p.isShutdown.Load() {
|
||||
return trace.NewNoopTracerProvider().Tracer(name, opts...), true
|
||||
return noop.NewTracerProvider().Tracer(name, opts...), true
|
||||
}
|
||||
t, ok := p.namedTracer[is]
|
||||
if !ok {
|
||||
|
4
vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
generated
vendored
4
vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
generated
vendored
@ -158,9 +158,9 @@ func NeverSample() Sampler {
|
||||
return alwaysOffSampler{}
|
||||
}
|
||||
|
||||
// ParentBased returns a composite sampler which behaves differently,
|
||||
// ParentBased returns a sampler decorator which behaves differently,
|
||||
// based on the parent of the span. If the span has no parent,
|
||||
// the root(Sampler) is used to make sampling decision. If the span has
|
||||
// the decorated sampler is used to make sampling decision. If the span has
|
||||
// a parent, depending on whether the parent is remote and whether it
|
||||
// is sampled, one of the following samplers will apply:
|
||||
// - remoteParentSampled(Sampler) (default: AlwaysOn)
|
||||
|
11
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
11
vendor/go.opentelemetry.io/otel/sdk/trace/span.go
generated
vendored
@ -32,6 +32,7 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
// ReadOnlySpan allows reading information from the data structure underlying a
|
||||
@ -108,6 +109,8 @@ type ReadWriteSpan interface {
|
||||
// recordingSpan is an implementation of the OpenTelemetry Span API
|
||||
// representing the individual component of a trace that is sampled.
|
||||
type recordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// mu protects the contents of this span.
|
||||
mu sync.Mutex
|
||||
|
||||
@ -158,8 +161,10 @@ type recordingSpan struct {
|
||||
tracer *tracer
|
||||
}
|
||||
|
||||
var _ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
var _ runtimeTracer = (*recordingSpan)(nil)
|
||||
var (
|
||||
_ ReadWriteSpan = (*recordingSpan)(nil)
|
||||
_ runtimeTracer = (*recordingSpan)(nil)
|
||||
)
|
||||
|
||||
// SpanContext returns the SpanContext of this span.
|
||||
func (s *recordingSpan) SpanContext() trace.SpanContext {
|
||||
@ -772,6 +777,8 @@ func (s *recordingSpan) runtimeTrace(ctx context.Context) context.Context {
|
||||
// that wraps a SpanContext. It performs no operations other than to return
|
||||
// the wrapped SpanContext or TracerProvider that created it.
|
||||
type nonRecordingSpan struct {
|
||||
embedded.Span
|
||||
|
||||
// tracer is the SDK tracer that created this span.
|
||||
tracer *tracer
|
||||
sc trace.SpanContext
|
||||
|
3
vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
generated
vendored
3
vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
generated
vendored
@ -20,9 +20,12 @@ import (
|
||||
|
||||
"go.opentelemetry.io/otel/sdk/instrumentation"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
type tracer struct {
|
||||
embedded.Tracer
|
||||
|
||||
provider *TracerProvider
|
||||
instrumentationScope instrumentation.Scope
|
||||
}
|
||||
|
2
vendor/go.opentelemetry.io/otel/sdk/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/sdk/version.go
generated
vendored
@ -16,5 +16,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
|
||||
|
||||
// Version is the current release version of the OpenTelemetry SDK in use.
|
||||
func Version() string {
|
||||
return "1.19.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
118
vendor/go.opentelemetry.io/otel/trace/noop/noop.go
generated
vendored
Normal file
118
vendor/go.opentelemetry.io/otel/trace/noop/noop.go
generated
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
// Copyright The OpenTelemetry Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package noop provides an implementation of the OpenTelemetry trace API that
|
||||
// produces no telemetry and minimizes used computation resources.
|
||||
//
|
||||
// Using this package to implement the OpenTelemetry trace API will effectively
|
||||
// disable OpenTelemetry.
|
||||
//
|
||||
// This implementation can be embedded in other implementations of the
|
||||
// OpenTelemetry trace API. Doing so will mean the implementation defaults to
|
||||
// no operation for methods it does not implement.
|
||||
package noop // import "go.opentelemetry.io/otel/trace/noop"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.opentelemetry.io/otel/trace/embedded"
|
||||
)
|
||||
|
||||
var (
|
||||
// Compile-time check this implements the OpenTelemetry API.
|
||||
|
||||
_ trace.TracerProvider = TracerProvider{}
|
||||
_ trace.Tracer = Tracer{}
|
||||
_ trace.Span = Span{}
|
||||
)
|
||||
|
||||
// TracerProvider is an OpenTelemetry No-Op TracerProvider.
|
||||
type TracerProvider struct{ embedded.TracerProvider }
|
||||
|
||||
// NewTracerProvider returns a TracerProvider that does not record any telemetry.
|
||||
func NewTracerProvider() TracerProvider {
|
||||
return TracerProvider{}
|
||||
}
|
||||
|
||||
// Tracer returns an OpenTelemetry Tracer that does not record any telemetry.
|
||||
func (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {
|
||||
return Tracer{}
|
||||
}
|
||||
|
||||
// Tracer is an OpenTelemetry No-Op Tracer.
|
||||
type Tracer struct{ embedded.Tracer }
|
||||
|
||||
// Start creates a span. The created span will be set in a child context of ctx
|
||||
// and returned with the span.
|
||||
//
|
||||
// If ctx contains a span context, the returned span will also contain that
|
||||
// span context. If the span context in ctx is for a non-recording span, that
|
||||
// span instance will be returned directly.
|
||||
func (t Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
span := trace.SpanFromContext(ctx)
|
||||
|
||||
// If the parent context contains a non-zero span context, that span
|
||||
// context needs to be returned as a non-recording span
|
||||
// (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk).
|
||||
var zeroSC trace.SpanContext
|
||||
if sc := span.SpanContext(); !sc.Equal(zeroSC) {
|
||||
if !span.IsRecording() {
|
||||
// If the span is not recording return it directly.
|
||||
return ctx, span
|
||||
}
|
||||
// Otherwise, return the span context needs in a non-recording span.
|
||||
span = Span{sc: sc}
|
||||
} else {
|
||||
// No parent, return a No-Op span with an empty span context.
|
||||
span = Span{}
|
||||
}
|
||||
return trace.ContextWithSpan(ctx, span), span
|
||||
}
|
||||
|
||||
// Span is an OpenTelemetry No-Op Span.
|
||||
type Span struct {
|
||||
embedded.Span
|
||||
|
||||
sc trace.SpanContext
|
||||
}
|
||||
|
||||
// SpanContext returns an empty span context.
|
||||
func (s Span) SpanContext() trace.SpanContext { return s.sc }
|
||||
|
||||
// IsRecording always returns false.
|
||||
func (Span) IsRecording() bool { return false }
|
||||
|
||||
// SetStatus does nothing.
|
||||
func (Span) SetStatus(codes.Code, string) {}
|
||||
|
||||
// SetAttributes does nothing.
|
||||
func (Span) SetAttributes(...attribute.KeyValue) {}
|
||||
|
||||
// End does nothing.
|
||||
func (Span) End(...trace.SpanEndOption) {}
|
||||
|
||||
// RecordError does nothing.
|
||||
func (Span) RecordError(error, ...trace.EventOption) {}
|
||||
|
||||
// AddEvent does nothing.
|
||||
func (Span) AddEvent(string, ...trace.EventOption) {}
|
||||
|
||||
// SetName does nothing.
|
||||
func (Span) SetName(string) {}
|
||||
|
||||
// TracerProvider returns a No-Op TracerProvider.
|
||||
func (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} }
|
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
2
vendor/go.opentelemetry.io/otel/version.go
generated
vendored
@ -16,5 +16,5 @@ package otel // import "go.opentelemetry.io/otel"
|
||||
|
||||
// Version is the current release version of OpenTelemetry in use.
|
||||
func Version() string {
|
||||
return "1.20.0"
|
||||
return "1.21.0"
|
||||
}
|
||||
|
7
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
7
vendor/go.opentelemetry.io/otel/versions.yaml
generated
vendored
@ -14,13 +14,12 @@
|
||||
|
||||
module-sets:
|
||||
stable-v1:
|
||||
version: v1.20.0
|
||||
version: v1.21.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel
|
||||
- go.opentelemetry.io/otel/bridge/opentracing
|
||||
- go.opentelemetry.io/otel/bridge/opentracing/test
|
||||
- go.opentelemetry.io/otel/example/dice
|
||||
- go.opentelemetry.io/otel/example/fib
|
||||
- go.opentelemetry.io/otel/example/namedtracer
|
||||
- go.opentelemetry.io/otel/example/otel-collector
|
||||
- go.opentelemetry.io/otel/example/passthrough
|
||||
@ -35,14 +34,12 @@ module-sets:
|
||||
- go.opentelemetry.io/otel/sdk/metric
|
||||
- go.opentelemetry.io/otel/trace
|
||||
experimental-metrics:
|
||||
version: v0.43.0
|
||||
version: v0.44.0
|
||||
modules:
|
||||
- go.opentelemetry.io/otel/bridge/opencensus
|
||||
- go.opentelemetry.io/otel/bridge/opencensus/test
|
||||
- go.opentelemetry.io/otel/example/opencensus
|
||||
- go.opentelemetry.io/otel/example/prometheus
|
||||
- go.opentelemetry.io/otel/example/view
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
|
||||
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
|
||||
- go.opentelemetry.io/otel/exporters/prometheus
|
||||
|
9
vendor/modules.txt
vendored
9
vendor/modules.txt
vendored
@ -573,7 +573,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/inte
|
||||
## explicit; go 1.19
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil
|
||||
# go.opentelemetry.io/otel v1.20.0
|
||||
# go.opentelemetry.io/otel v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel
|
||||
go.opentelemetry.io/otel/attribute
|
||||
@ -599,11 +599,11 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
|
||||
# go.opentelemetry.io/otel/metric v1.20.0
|
||||
# go.opentelemetry.io/otel/metric v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/metric
|
||||
go.opentelemetry.io/otel/metric/embedded
|
||||
# go.opentelemetry.io/otel/sdk v1.19.0
|
||||
# go.opentelemetry.io/otel/sdk v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/sdk
|
||||
go.opentelemetry.io/otel/sdk/instrumentation
|
||||
@ -611,10 +611,11 @@ go.opentelemetry.io/otel/sdk/internal
|
||||
go.opentelemetry.io/otel/sdk/internal/env
|
||||
go.opentelemetry.io/otel/sdk/resource
|
||||
go.opentelemetry.io/otel/sdk/trace
|
||||
# go.opentelemetry.io/otel/trace v1.20.0
|
||||
# go.opentelemetry.io/otel/trace v1.21.0
|
||||
## explicit; go 1.20
|
||||
go.opentelemetry.io/otel/trace
|
||||
go.opentelemetry.io/otel/trace/embedded
|
||||
go.opentelemetry.io/otel/trace/noop
|
||||
# go.opentelemetry.io/proto/otlp v1.0.0
|
||||
## explicit; go 1.17
|
||||
go.opentelemetry.io/proto/otlp/collector/trace/v1
|
||||
|
Loading…
Reference in New Issue
Block a user