Upgrade go.opentelemetry.io/otel
from v0.20.0 to v1.11.2 (#18589)
This commit is contained in:
parent
9ff106f30e
commit
1475ffe740
3
changelog/18589.txt
Normal file
3
changelog/18589.txt
Normal file
@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
vault/diagnose: Upgrade `go.opentelemetry.io/otel`, `go.opentelemetry.io/otel/sdk`, `go.opentelemetry.io/otel/trace` to v1.11.2
|
||||
```
|
8
go.mod
8
go.mod
@ -187,9 +187,9 @@ require (
|
||||
go.etcd.io/etcd/client/v3 v3.5.0
|
||||
go.mongodb.org/atlas v0.15.0
|
||||
go.mongodb.org/mongo-driver v1.7.3
|
||||
go.opentelemetry.io/otel v0.20.0
|
||||
go.opentelemetry.io/otel/sdk v0.20.0
|
||||
go.opentelemetry.io/otel/trace v0.20.0
|
||||
go.opentelemetry.io/otel v1.11.2
|
||||
go.opentelemetry.io/otel/sdk v1.11.2
|
||||
go.opentelemetry.io/otel/trace v1.11.2
|
||||
go.uber.org/atomic v1.9.0
|
||||
go.uber.org/goleak v1.1.12
|
||||
golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8
|
||||
@ -292,6 +292,7 @@ require (
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect
|
||||
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-openapi/analysis v0.20.0 // indirect
|
||||
github.com/go-openapi/errors v0.19.9 // indirect
|
||||
@ -423,7 +424,6 @@ require (
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v0.20.0 // indirect
|
||||
go.uber.org/multierr v1.7.0 // indirect
|
||||
go.uber.org/zap v1.19.1 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
|
19
go.sum
19
go.sum
@ -633,8 +633,11 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk=
|
||||
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
@ -1875,16 +1878,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g=
|
||||
go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo=
|
||||
go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8=
|
||||
go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU=
|
||||
go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw=
|
||||
go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw=
|
||||
go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8=
|
||||
go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc=
|
||||
go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw=
|
||||
go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw=
|
||||
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
|
||||
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
|
||||
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
|
||||
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
|
||||
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
|
||||
go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
|
@ -93,7 +93,7 @@ func (s *Session) Finalize(ctx context.Context) *Result {
|
||||
}
|
||||
|
||||
// StartSpan starts a "diagnose" span, which is really just an OpenTelemetry Tracing span.
|
||||
func StartSpan(ctx context.Context, spanName string, options ...trace.SpanOption) (context.Context, trace.Span) {
|
||||
func StartSpan(ctx context.Context, spanName string, options ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
session := CurrentSession(ctx)
|
||||
if session != nil {
|
||||
return session.tracer.Start(ctx, spanName, options...)
|
||||
@ -201,7 +201,7 @@ func SpotCheck(ctx context.Context, checkName string, f func() error) error {
|
||||
|
||||
// Test creates a new named span, and executes the provided function within it. If the function returns an error,
|
||||
// the span is considered to have failed.
|
||||
func Test(ctx context.Context, spanName string, function testFunction, options ...trace.SpanOption) error {
|
||||
func Test(ctx context.Context, spanName string, function testFunction, options ...trace.SpanStartOption) error {
|
||||
ctx, span := StartSpan(ctx, spanName, options...)
|
||||
defer span.End()
|
||||
sess := CurrentSession(ctx)
|
||||
|
@ -178,7 +178,7 @@ func (t *TelemetryCollector) getOrBuildResult(id trace.SpanID) *Result {
|
||||
if !ok {
|
||||
r = &Result{
|
||||
Name: s.Name(),
|
||||
Message: s.StatusMessage(),
|
||||
Message: s.Status().Description,
|
||||
Time: s.StartTime(),
|
||||
}
|
||||
for _, e := range s.Events() {
|
||||
@ -255,7 +255,7 @@ func (t *TelemetryCollector) getOrBuildResult(id trace.SpanID) *Result {
|
||||
}
|
||||
}
|
||||
}
|
||||
switch s.StatusCode() {
|
||||
switch s.Status().Code {
|
||||
case codes.Unset:
|
||||
if len(r.Warnings) > 0 {
|
||||
r.Status = WarningStatus
|
||||
@ -276,7 +276,7 @@ func (t *TelemetryCollector) getOrBuildResult(id trace.SpanID) *Result {
|
||||
return r
|
||||
}
|
||||
|
||||
func findAttribute(e trace.Event, attr attribute.Key) string {
|
||||
func findAttribute(e sdktrace.Event, attr attribute.Key) string {
|
||||
for _, a := range e.Attributes {
|
||||
if a.Key == attr {
|
||||
return a.Value.AsString()
|
||||
@ -285,7 +285,7 @@ func findAttribute(e trace.Event, attr attribute.Key) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func findAttributes(e trace.Event, attr1, attr2 attribute.Key) (string, string) {
|
||||
func findAttributes(e sdktrace.Event, attr1, attr2 attribute.Key) (string, string) {
|
||||
var av1, av2 string
|
||||
for _, a := range e.Attributes {
|
||||
switch a.Key {
|
||||
|
Loading…
Reference in New Issue
Block a user