diff --git a/.golangci.yml b/.golangci.yml index e3962bf918f..ceddb297cb4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,7 +22,10 @@ linters: - misspell - revive - staticcheck + - tenv - typecheck + - unconvert + - unparam - unused issues: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3e6302abd..0d6868c9a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Custom attributes targeting metrics recorded by the `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` are not ignored anymore. (#5129) - Use `c.FullPath()` method to set `http.route` attribute in `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`. (#5734) - The double setup in `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/example` that caused duplicate traces. (#5564) +- Out-of-bounds panic in case of invalid span ID in `go.opentelemetry.io/contrib/propagators/b3`. (#5754) - Non-200 HTTP status codes when retrieving sampling rules in `go.opentelemetry.io/contrib/samplers/aws/xray` now return an error. (#5718) ### Deprecated @@ -44,6 +45,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Improve performance of `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` with the usage of `WithAttributeSet()` instead of `WithAttribute()`. (#5664) - Improve performance of `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` with the usage of `WithAttributeSet()` instead of `WithAttribute()`. (#5664) +- Update `go.opentelemetry.io/contrib/config` to latest released configuration schema which introduces breaking changes where `Attributes` is now a `map[string]interface{}`. (#5758) ## [1.27.0/0.52.0/0.21.0/0.7.0/0.2.0] - 2024-05-21 diff --git a/Makefile b/Makefile index 9404d8203a6..afc4c388c3f 100644 --- a/Makefile +++ b/Makefile @@ -323,7 +323,7 @@ update-all-otel-deps: OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_SRC_DIR=tmp/opentelememetry-configuration # The SHA matching the current version of the opentelemetry-configuration schema to use -OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_VERSION=f38ac7c3a499ae5f81924ef9c455c27a56130562 +OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_VERSION=v0.2.0 # Cleanup temporary directory genjsonschema-cleanup: diff --git a/bridges/otelzap/core.go b/bridges/otelzap/core.go index 2b9da0892f9..59914e125c3 100644 --- a/bridges/otelzap/core.go +++ b/bridges/otelzap/core.go @@ -154,8 +154,8 @@ func (o *Core) Write(ent zapcore.Entry, fields []zapcore.Field) error { r.SetTimestamp(ent.Time) r.SetBody(log.StringValue(ent.Message)) r.SetSeverity(convertLevel(ent.Level)) + r.SetSeverityText(ent.Level.String()) - // TODO: Handle zap.Namespace. // TODO: Handle ent.LoggerName. r.AddAttributes(o.attr...) diff --git a/bridges/otelzap/core_test.go b/bridges/otelzap/core_test.go index 8dea6323826..274acb8667d 100644 --- a/bridges/otelzap/core_test.go +++ b/bridges/otelzap/core_test.go @@ -5,7 +5,9 @@ package otelzap import ( "context" + "fmt" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -22,6 +24,10 @@ var ( loggerName = "name" testKey = "key" testValue = "value" + testEntry = zapcore.Entry{ + Level: zap.InfoLevel, + Message: testMessage, + } ) func TestCore(t *testing.T) { @@ -34,9 +40,10 @@ func TestCore(t *testing.T) { got := rec.Result()[0].Records[0] assert.Equal(t, testMessage, got.Body().AsString()) assert.Equal(t, log.SeverityInfo, got.Severity()) + assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) assert.Equal(t, 1, got.AttributesLen()) got.WalkAttributes(func(kv log.KeyValue) bool { - assert.Equal(t, testKey, string(kv.Key)) + assert.Equal(t, testKey, kv.Key) assert.Equal(t, testValue, value2Result(kv.Value)) return true }) @@ -56,11 +63,12 @@ func TestCore(t *testing.T) { got := rec.Result()[0].Records[0] assert.Equal(t, testMessage, got.Body().AsString()) assert.Equal(t, log.SeverityInfo, got.Severity()) + assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) assert.Equal(t, 2, got.AttributesLen()) index := 0 got.WalkAttributes(func(kv log.KeyValue) bool { - assert.Equal(t, testCases[index][0], string(kv.Key)) + assert.Equal(t, testCases[index][0], kv.Key) assert.Equal(t, testCases[index][1], value2Result(kv.Value)) index++ return true @@ -78,11 +86,12 @@ func TestCore(t *testing.T) { got := rec.Result()[0].Records[0] assert.Equal(t, testMessage, got.Body().AsString()) assert.Equal(t, log.SeverityInfo, got.Severity()) + assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) assert.Equal(t, 3, got.AttributesLen()) index := 0 got.WalkAttributes(func(kv log.KeyValue) bool { - assert.Equal(t, testCases[index][0], string(kv.Key)) + assert.Equal(t, testCases[index][0], kv.Key) assert.Equal(t, testCases[index][1], value2Result(kv.Value)) index++ return true @@ -113,6 +122,7 @@ func TestCoreEnabled(t *testing.T) { got := r.Result()[0].Records[0] assert.Equal(t, testMessage, got.Body().AsString()) assert.Equal(t, log.SeverityInfo, got.Severity()) + assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) } func TestNewCoreConfiguration(t *testing.T) { @@ -174,3 +184,99 @@ func TestConvertLevel(t *testing.T) { } } } + +func BenchmarkCoreWrite(b *testing.B) { + benchmarks := []struct { + name string + fields []zapcore.Field + }{ + { + name: "10 fields", + fields: []zapcore.Field{ + zap.Int16("a", 1), + zap.String("k", "a"), + zap.Bool("k", true), + zap.Time("k", time.Unix(1000, 1000)), + zap.Binary("k", []byte{1, 2}), + zap.ByteString("k", []byte{1, 2}), + zap.Object("k", loggable{true}), + zap.Array("k", loggable{true}), + zap.String("k", "a"), + zap.Ints("k", []int{1, 2}), + }, + }, + { + name: "20 fields", + fields: []zapcore.Field{ + zap.Int16("a", 1), + zap.String("k", "a"), + zap.Bool("k", true), + zap.Time("k", time.Unix(1000, 1000)), + zap.Binary("k", []byte{1, 2}), + zap.ByteString("k", []byte{1, 2}), + zap.Object("k", loggable{true}), + zap.String("k", "a"), + zap.Array("k", loggable{true}), + zap.Ints("k", []int{1, 2}), + zap.Int16("a", 1), + zap.String("k", "a"), + zap.Bool("k", true), + zap.Time("k", time.Unix(1000, 1000)), + zap.Binary("k", []byte{1, 2}), + zap.ByteString("k", []byte{1, 2}), + zap.Object("k", loggable{true}), + zap.Array("k", loggable{true}), + zap.String("k", "a"), + zap.Ints("k", []int{1, 2}), + }, + }, + { // Benchmark with nested namespace + name: "Namespace", + fields: []zapcore.Field{ + zap.Namespace("a"), + zap.Int16("a", 1), + zap.String("k", "a"), + zap.Bool("k", true), + zap.Time("k", time.Unix(1000, 1000)), + zap.Binary("k", []byte{1, 2}), + zap.Namespace("b"), + zap.Binary("k", []byte{1, 2}), + zap.Object("k", loggable{true}), + zap.String("k", "a"), + zap.Array("k", loggable{true}), + zap.Ints("k", []int{1, 2}), + }, + }, + } + + for _, bm := range benchmarks { + b.Run(bm.name, func(b *testing.B) { + zc := NewCore(loggerName) + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := zc.Write(testEntry, bm.fields) + if err != nil { + b.Errorf("Unexpected error: %v", err) + } + } + }) + }) + } + + for _, bm := range benchmarks { + b.Run(fmt.Sprint("With", bm.name), func(b *testing.B) { + zc := NewCore(loggerName) + zc1 := zc.With(bm.fields) + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + err := zc1.Write(testEntry, []zapcore.Field{}) + if err != nil { + b.Errorf("Unexpected error: %v", err) + } + } + }) + }) + } +} diff --git a/bridges/otelzap/encoder.go b/bridges/otelzap/encoder.go index 220d113aff1..8b962bd309c 100644 --- a/bridges/otelzap/encoder.go +++ b/bridges/otelzap/encoder.go @@ -260,7 +260,7 @@ func (a *arrayEncoder) AppendDuration(v time.Duration) { a.AppendInt64(v.Nanosec func (a *arrayEncoder) AppendInt32(v int32) { a.AppendInt64(int64(v)) } func (a *arrayEncoder) AppendInt16(v int16) { a.AppendInt64(int64(v)) } func (a *arrayEncoder) AppendInt8(v int8) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(int64(v.UnixNano())) } +func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(v.UnixNano()) } func (a *arrayEncoder) AppendUint(v uint) { a.AppendUint64(uint64(v)) } func (a *arrayEncoder) AppendUint32(v uint32) { a.AppendInt64(int64(v)) } func (a *arrayEncoder) AppendUint16(v uint16) { a.AppendInt64(int64(v)) } diff --git a/bridges/prometheus/go.mod b/bridges/prometheus/go.mod index 8b6cde58d4d..7ae4d92646a 100644 --- a/bridges/prometheus/go.mod +++ b/bridges/prometheus/go.mod @@ -18,8 +18,9 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/kr/text v0.2.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 // indirect diff --git a/bridges/prometheus/go.sum b/bridges/prometheus/go.sum index b9a73441f46..973b1e070a7 100644 --- a/bridges/prometheus/go.sum +++ b/bridges/prometheus/go.sum @@ -16,14 +16,16 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= diff --git a/config/generated_config.go b/config/generated_config.go index 64154ee5437..244a9756899 100644 --- a/config/generated_config.go +++ b/config/generated_config.go @@ -18,12 +18,7 @@ type AttributeLimits struct { AdditionalProperties interface{} } -type Attributes struct { - // ServiceName corresponds to the JSON schema field "service.name". - ServiceName *string `mapstructure:"service.name,omitempty"` - - AdditionalProperties interface{} -} +type Attributes map[string]interface{} type BatchLogRecordProcessor struct { // ExportTimeout corresponds to the JSON schema field "export_timeout". @@ -101,9 +96,33 @@ type Common map[string]interface{} type Console map[string]interface{} +type Detectors struct { + // Attributes corresponds to the JSON schema field "attributes". + Attributes *DetectorsAttributes `mapstructure:"attributes,omitempty"` +} + +type DetectorsAttributes struct { + // Excluded corresponds to the JSON schema field "excluded". + Excluded []string `mapstructure:"excluded,omitempty"` + + // Included corresponds to the JSON schema field "included". + Included []string `mapstructure:"included,omitempty"` +} + type Headers map[string]string +type IncludeExclude struct { + // Excluded corresponds to the JSON schema field "excluded". + Excluded []string `mapstructure:"excluded,omitempty"` + + // Included corresponds to the JSON schema field "included". + Included []string `mapstructure:"included,omitempty"` +} + type LogRecordExporter struct { + // Console corresponds to the JSON schema field "console". + Console Console `mapstructure:"console,omitempty"` + // OTLP corresponds to the JSON schema field "otlp". OTLP *OTLP `mapstructure:"otlp,omitempty"` @@ -186,6 +205,9 @@ type OTLP struct { // Headers corresponds to the JSON schema field "headers". Headers Headers `mapstructure:"headers,omitempty"` + // Insecure corresponds to the JSON schema field "insecure". + Insecure *bool `mapstructure:"insecure,omitempty"` + // Protocol corresponds to the JSON schema field "protocol". Protocol string `mapstructure:"protocol"` @@ -216,6 +238,9 @@ type OTLPMetric struct { // Headers corresponds to the JSON schema field "headers". Headers Headers `mapstructure:"headers,omitempty"` + // Insecure corresponds to the JSON schema field "insecure". + Insecure *bool `mapstructure:"insecure,omitempty"` + // Protocol corresponds to the JSON schema field "protocol". Protocol string `mapstructure:"protocol"` @@ -381,6 +406,10 @@ type Prometheus struct { // Port corresponds to the JSON schema field "port". Port *int `mapstructure:"port,omitempty"` + // WithResourceConstantLabels corresponds to the JSON schema field + // "with_resource_constant_labels". + WithResourceConstantLabels *IncludeExclude `mapstructure:"with_resource_constant_labels,omitempty"` + // WithoutScopeInfo corresponds to the JSON schema field "without_scope_info". WithoutScopeInfo *bool `mapstructure:"without_scope_info,omitempty"` @@ -423,7 +452,10 @@ func (j *PullMetricReader) UnmarshalJSON(b []byte) error { type Resource struct { // Attributes corresponds to the JSON schema field "attributes". - Attributes *Attributes `mapstructure:"attributes,omitempty"` + Attributes Attributes `mapstructure:"attributes,omitempty"` + + // Detectors corresponds to the JSON schema field "detectors". + Detectors *Detectors `mapstructure:"detectors,omitempty"` // SchemaUrl corresponds to the JSON schema field "schema_url". SchemaUrl *string `mapstructure:"schema_url,omitempty"` diff --git a/config/go.mod b/config/go.mod index e49040d46d5..da276d8e935 100644 --- a/config/go.mod +++ b/config/go.mod @@ -30,17 +30,18 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/grpc v1.64.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/config/go.sum b/config/go.sum index 7152ea9f1e2..8ac0a24372e 100644 --- a/config/go.sum +++ b/config/go.sum @@ -19,14 +19,16 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -75,10 +77,10 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/config/resource.go b/config/resource.go index 302a59637e6..020d6660b23 100644 --- a/config/resource.go +++ b/config/resource.go @@ -8,7 +8,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" ) func keyVal(k string, v any) attribute.KeyValue { @@ -50,14 +49,10 @@ func newResource(res *Resource) (*resource.Resource, error) { if res == nil || res.Attributes == nil { return resource.Default(), nil } - attrs := []attribute.KeyValue{ - semconv.ServiceName(*res.Attributes.ServiceName), - } + var attrs []attribute.KeyValue - if props, ok := res.Attributes.AdditionalProperties.(map[string]any); ok { - for k, v := range props { - attrs = append(attrs, keyVal(k, v)) - } + for k, v := range res.Attributes { + attrs = append(attrs, keyVal(k, v)) } return resource.Merge(resource.Default(), diff --git a/config/resource_test.go b/config/resource_test.go index 04611fa0f21..556e5e5be34 100644 --- a/config/resource_test.go +++ b/config/resource_test.go @@ -63,8 +63,8 @@ func TestNewResource(t *testing.T) { name: "resource-with-attributes-invalid-schema", config: &Resource{ SchemaUrl: ptr("https://opentelemetry.io/invalid-schema"), - Attributes: &Attributes{ - ServiceName: ptr("service-a"), + Attributes: Attributes{ + "service.name": "service-a", }, }, wantResource: resource.NewSchemaless(res.Attributes()...), @@ -73,8 +73,8 @@ func TestNewResource(t *testing.T) { { name: "resource-with-attributes-and-schema", config: &Resource{ - Attributes: &Attributes{ - ServiceName: ptr("service-a"), + Attributes: Attributes{ + "service.name": "service-a", }, SchemaUrl: ptr(semconv.SchemaURL), }, @@ -83,25 +83,23 @@ func TestNewResource(t *testing.T) { { name: "resource-with-additional-attributes-and-schema", config: &Resource{ - Attributes: &Attributes{ - ServiceName: ptr("service-a"), - AdditionalProperties: map[string]any{ - "attr-bool": true, - "attr-int64": int64(-164), - "attr-uint64": uint64(164), - "attr-float64": float64(64.0), - "attr-int8": int8(-18), - "attr-uint8": uint8(18), - "attr-int16": int16(-116), - "attr-uint16": uint16(116), - "attr-int32": int32(-132), - "attr-uint32": uint32(132), - "attr-float32": float32(32.0), - "attr-int": int(-1), - "attr-uint": uint(1), - "attr-string": "string-val", - "attr-default": other, - }, + Attributes: Attributes{ + "service.name": "service-a", + "attr-bool": true, + "attr-int64": int64(-164), + "attr-uint64": uint64(164), + "attr-float64": float64(64.0), + "attr-int8": int8(-18), + "attr-uint8": uint8(18), + "attr-int16": int16(-116), + "attr-uint16": uint16(116), + "attr-int32": int32(-132), + "attr-uint32": uint32(132), + "attr-float32": float32(32.0), + "attr-int": int(-1), + "attr-uint": uint(1), + "attr-string": "string-val", + "attr-default": other, }, SchemaUrl: ptr(semconv.SchemaURL), }, diff --git a/detectors/aws/ec2/go.mod b/detectors/aws/ec2/go.mod index 90860baffe8..c3221f275c9 100644 --- a/detectors/aws/ec2/go.mod +++ b/detectors/aws/ec2/go.mod @@ -3,7 +3,7 @@ module go.opentelemetry.io/contrib/detectors/aws/ec2 go 1.21 require ( - github.com/aws/aws-sdk-go v1.54.6 + github.com/aws/aws-sdk-go v1.54.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/sdk v1.27.0 diff --git a/detectors/aws/ec2/go.sum b/detectors/aws/ec2/go.sum index b96d6498318..6b56c633040 100644 --- a/detectors/aws/ec2/go.sum +++ b/detectors/aws/ec2/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.54.9 h1:e0Czh9AhrCVPuyaIUnibYmih3cYexJKlqlHSJ2eMKbI= +github.com/aws/aws-sdk-go v1.54.9/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/detectors/gcp/cloud-function.go b/detectors/gcp/cloud-function.go index 113aa277347..debdc2484c1 100644 --- a/detectors/gcp/cloud-function.go +++ b/detectors/gcp/cloud-function.go @@ -41,7 +41,7 @@ func (f *cloudFunction) Detect(ctx context.Context) (*resource.Resource, error) if err != nil { return nil, err } - region, err := f.cloudRun.cloudRegion(ctx) + region, err := f.cloudRun.cloudRegion() if err != nil { return nil, err } diff --git a/detectors/gcp/cloud-run.go b/detectors/gcp/cloud-run.go index 11c1d8823da..2168f4854bc 100644 --- a/detectors/gcp/cloud-run.go +++ b/detectors/gcp/cloud-run.go @@ -50,7 +50,7 @@ func NewCloudRun() *CloudRun { } } -func (c *CloudRun) cloudRegion(ctx context.Context) (string, error) { +func (c *CloudRun) cloudRegion() (string, error) { region, err := c.mc.Get("instance/region") if err != nil { return "", err @@ -84,7 +84,7 @@ func (c *CloudRun) Detect(ctx context.Context) (*resource.Resource, error) { attributes = append(attributes, semconv.CloudAccountID(projectID)) } - if region, err := c.cloudRegion(ctx); hasProblem(err) { + if region, err := c.cloudRegion(); hasProblem(err) { errInfo = append(errInfo, err.Error()) } else if region != "" { attributes = append(attributes, semconv.CloudRegion(region)) diff --git a/exporters/autoexport/go.mod b/exporters/autoexport/go.mod index ebae5baca79..2732dcc4fff 100644 --- a/exporters/autoexport/go.mod +++ b/exporters/autoexport/go.mod @@ -7,7 +7,6 @@ toolchain go1.22.4 require ( github.com/prometheus/client_golang v1.19.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/pdata v1.10.0 go.opentelemetry.io/contrib/bridges/prometheus v0.52.0 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 @@ -23,7 +22,9 @@ require ( go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/sdk/log v0.3.0 go.opentelemetry.io/otel/sdk/metric v1.27.0 + go.opentelemetry.io/proto/otlp v1.3.1 go.uber.org/goleak v1.3.0 + google.golang.org/protobuf v1.34.2 ) require ( @@ -33,27 +34,21 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/otel/log v0.3.0 // indirect go.opentelemetry.io/otel/metric v1.27.0 // indirect go.opentelemetry.io/otel/trace v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect - go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporters/autoexport/go.sum b/exporters/autoexport/go.sum index 31d9d0dfb11..b8331ee6029 100644 --- a/exporters/autoexport/go.sum +++ b/exporters/autoexport/go.sum @@ -4,7 +4,6 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -12,46 +11,30 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v1.10.0 h1:oLyPLGvPTQrcRT64ZVruwvmH/u3SHTfNo01pteS4WOE= -go.opentelemetry.io/collector/pdata v1.10.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0 h1:ccBrA8nCY5mM0y5uO7FT0ze4S0TuFcWdDB2FxGMTjkI= @@ -90,43 +73,16 @@ go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeX go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/exporters/autoexport/metrics_test.go b/exporters/autoexport/metrics_test.go index 3eb711b8690..da35b4aa570 100644 --- a/exporters/autoexport/metrics_test.go +++ b/exporters/autoexport/metrics_test.go @@ -14,14 +14,15 @@ import ( "strings" "testing" - "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" - prometheusbridge "go.opentelemetry.io/contrib/bridges/prometheus" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/sdk/metric" - "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "go.uber.org/goleak" + "google.golang.org/protobuf/proto" + + prometheusbridge "go.opentelemetry.io/contrib/bridges/prometheus" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/sdk/metric" + otlpmetrics "go.opentelemetry.io/proto/otlp/collector/metrics/v1" ) func TestMetricExporterNone(t *testing.T) { @@ -135,11 +136,13 @@ func TestMetricProducerPrometheusWithOTLPExporter(t *testing.T) { assert.NoError(t, r.Body.Close()) // Now parse the otlp proto message from request body. - req := pmetricotlp.NewExportRequest() - assert.NoError(t, req.UnmarshalProto(body)) + req := &otlpmetrics.ExportMetricsServiceRequest{} + assert.NoError(t, proto.Unmarshal(body, req)) // This is 0 without the producer registered. - assert.NotZero(t, req.Metrics().MetricCount()) + assert.NotZero(t, req.ResourceMetrics) + assert.NotZero(t, req.ResourceMetrics[0].ScopeMetrics) + assert.NotZero(t, req.ResourceMetrics[0].ScopeMetrics[0].Metrics) close(requestWaitChan) })) @@ -263,16 +266,16 @@ func TestMultipleMetricProducerWithOTLPExporter(t *testing.T) { assert.NoError(t, r.Body.Close()) // Now parse the otlp proto message from request body. - req := pmetricotlp.NewExportRequest() - assert.NoError(t, req.UnmarshalProto(body)) + req := &otlpmetrics.ExportMetricsServiceRequest{} + assert.NoError(t, proto.Unmarshal(body, req)) metricNames := []string{} - sm := req.Metrics().ResourceMetrics().At(0).ScopeMetrics() + sm := req.ResourceMetrics[0].ScopeMetrics - for i := 0; i < sm.Len(); i++ { - m := sm.At(i).Metrics() - for i := 0; i < m.Len(); i++ { - metricNames = append(metricNames, m.At(i).Name()) + for i := 0; i < len(sm); i++ { + m := sm[i].Metrics + for i := 0; i < len(m); i++ { + metricNames = append(metricNames, m[i].Name) } } diff --git a/instrgen/lib/context_propagation.go b/instrgen/lib/context_propagation.go index b4d70294e88..de4f5907be1 100644 --- a/instrgen/lib/context_propagation.go +++ b/instrgen/lib/context_propagation.go @@ -41,7 +41,7 @@ func (pass *ContextPropagationPass) Execute( // when callexpr is inside var decl // instead of functiondecl currentFun := FuncDescriptor{} - emitEmptyContext := func(callExpr *ast.CallExpr, fun FuncDescriptor, ctxArg *ast.Ident) { + emitEmptyContext := func(callExpr *ast.CallExpr, ctxArg *ast.Ident) { addImports = true if currentFun != (FuncDescriptor{}) { visited := map[FuncDescriptor]bool{} @@ -96,7 +96,7 @@ func (pass *ContextPropagationPass) Execute( visited := map[FuncDescriptor]bool{} if isPath(analysis.Callgraph, fun, analysis.RootFunctions[0], visited) { fmt.Println("\t\t\tContextPropagation FuncCall:", funId, pkg.TypesInfo.Uses[ident].Type().String()) - emitEmptyContext(callExpr, fun, ctxArg) + emitEmptyContext(callExpr, ctxArg) } } } diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod index e077860735c..8f28ef9596c 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod @@ -11,8 +11,8 @@ replace ( require ( github.com/aws/aws-lambda-go v1.47.0 - github.com/aws/aws-sdk-go-v2/config v1.27.21 - github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1 + github.com/aws/aws-sdk-go-v2/config v1.27.22 + github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0 go.opentelemetry.io/contrib/detectors/aws/lambda v0.52.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.52.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.52.0 @@ -25,22 +25,22 @@ require ( require ( github.com/aws/aws-sdk-go-v2 v1.30.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.21 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.22 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.12 // indirect - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 // indirect + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.14 // indirect github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.30.0 // indirect github.com/aws/smithy-go v1.20.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.2 // indirect diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum index 5abcaa47967..b6a9d977cc3 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum @@ -4,10 +4,10 @@ github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6 github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= +github.com/aws/aws-sdk-go-v2/config v1.27.22 h1:TRkQVtpDINt+Na/ToU7iptyW6U0awAwJ24q4XN+59k8= +github.com/aws/aws-sdk-go-v2/config v1.27.22/go.mod h1:EYY3mVgFRUWkh6QNKH64MdyKs1YSUgatc0Zp3MDxi7c= +github.com/aws/aws-sdk-go-v2/credentials v1.17.22 h1:wu9kXQbbt64ul09v3ye4HYleAr4WiGV/uv69EXKDEr0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.22/go.mod h1:pcvMtPcxJn3r2k6mZD9I0EcumLqPLA7V/0iCgOIlY+o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= @@ -18,8 +18,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7 github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.12 h1:DXFWyt7ymx/l1ygdyTTS0X923e+Q2wXIxConJzrgwc0= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.12/go.mod h1:mVOr/LbvaNySK1/BTy4cBOCjhCNY2raWBwK4v+WR5J4= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 h1:ZRxyyP9Tfkf5G9baYHvbd+/GvtKrzh3EBSgvcrkxVzY= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 h1:ur2U8zsOe1qmhlHgNVAg8P/HxSw8960K5ktDimxfK/Y= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.14 h1:oWccitSnByVU74rQRHac4gLfDqjB6Z1YQGOY/dXKedI= @@ -30,16 +30,16 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/p github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12 h1:tzha+v1SCEBpXWEuw6B/+jm4h5z8hZbTpXz0zRZqTnw= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12/go.mod h1:n+nt2qjHGoseWeLHt1vEr6ZRCCxIN2KcNpJxBcYQSwI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1 h1:wsg9Z/vNnCmxWikfGIoOlnExtEU459cR+2d+iDJ8elo= -github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1/go.mod h1:8rDw3mVwmvIWWX/+LWY3PPIMZuwnQdJMCt0iVFVT3qw= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 h1:m/7a5OgAZQDWJlSbZLWg4BAlbXbY6j+dDDjPY8rZ7kA= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= +github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0 h1:v2DWNY6ll3JK62Bx1khUu9fJ4f3TwXllIEJxI7dDv/o= +github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0/go.mod h1:8rDw3mVwmvIWWX/+LWY3PPIMZuwnQdJMCt0iVFVT3qw= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 h1:YWyd8KPykQE9YS7M+RTAlVyOmUxXiesIC2WtMMSEnX4= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.0 h1:lPIAPCRoJkmotLTU/9B6icUFlYDpEuWjKeL79XROv1M= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.0/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0 h1:/4r71ghx+hX9spr884cqXHPEmPzqH/J3K7fkE1yfcmw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.0 h1:9ja34PaKybhCJjVKvxtDsUjbATUJGN+eF6QnO58u5cI= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.0/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.mod b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.mod index f5a3b0c8633..890af61be4a 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.mod +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.mod @@ -34,8 +34,8 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.sum b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.sum index 1b83c524725..7ee41352336 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.sum +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.sum @@ -45,10 +45,10 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod index 7b08c1865c7..448cf034daf 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod @@ -6,9 +6,9 @@ replace go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2 require ( github.com/aws/aws-sdk-go-v2 v1.30.0 - github.com/aws/aws-sdk-go-v2/config v1.27.21 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 - github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1 + github.com/aws/aws-sdk-go-v2/config v1.27.22 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.52.0 go.opentelemetry.io/otel v1.27.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 @@ -18,7 +18,7 @@ require ( require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.21 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.22 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 // indirect @@ -29,10 +29,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.30.0 // indirect github.com/aws/smithy-go v1.20.2 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum index 0e968067136..8c9f1b0e64e 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum @@ -2,10 +2,10 @@ github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6 github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= +github.com/aws/aws-sdk-go-v2/config v1.27.22 h1:TRkQVtpDINt+Na/ToU7iptyW6U0awAwJ24q4XN+59k8= +github.com/aws/aws-sdk-go-v2/config v1.27.22/go.mod h1:EYY3mVgFRUWkh6QNKH64MdyKs1YSUgatc0Zp3MDxi7c= +github.com/aws/aws-sdk-go-v2/credentials v1.17.22 h1:wu9kXQbbt64ul09v3ye4HYleAr4WiGV/uv69EXKDEr0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.22/go.mod h1:pcvMtPcxJn3r2k6mZD9I0EcumLqPLA7V/0iCgOIlY+o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= @@ -16,8 +16,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7 github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.12 h1:DXFWyt7ymx/l1ygdyTTS0X923e+Q2wXIxConJzrgwc0= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.12/go.mod h1:mVOr/LbvaNySK1/BTy4cBOCjhCNY2raWBwK4v+WR5J4= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 h1:ZRxyyP9Tfkf5G9baYHvbd+/GvtKrzh3EBSgvcrkxVzY= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 h1:ur2U8zsOe1qmhlHgNVAg8P/HxSw8960K5ktDimxfK/Y= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.14 h1:oWccitSnByVU74rQRHac4gLfDqjB6Z1YQGOY/dXKedI= @@ -28,16 +28,16 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/p github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12 h1:tzha+v1SCEBpXWEuw6B/+jm4h5z8hZbTpXz0zRZqTnw= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.12/go.mod h1:n+nt2qjHGoseWeLHt1vEr6ZRCCxIN2KcNpJxBcYQSwI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1 h1:wsg9Z/vNnCmxWikfGIoOlnExtEU459cR+2d+iDJ8elo= -github.com/aws/aws-sdk-go-v2/service/s3 v1.56.1/go.mod h1:8rDw3mVwmvIWWX/+LWY3PPIMZuwnQdJMCt0iVFVT3qw= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 h1:m/7a5OgAZQDWJlSbZLWg4BAlbXbY6j+dDDjPY8rZ7kA= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= +github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0 h1:v2DWNY6ll3JK62Bx1khUu9fJ4f3TwXllIEJxI7dDv/o= +github.com/aws/aws-sdk-go-v2/service/s3 v1.57.0/go.mod h1:8rDw3mVwmvIWWX/+LWY3PPIMZuwnQdJMCt0iVFVT3qw= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 h1:YWyd8KPykQE9YS7M+RTAlVyOmUxXiesIC2WtMMSEnX4= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.0 h1:lPIAPCRoJkmotLTU/9B6icUFlYDpEuWjKeL79XROv1M= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.0/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0 h1:/4r71ghx+hX9spr884cqXHPEmPzqH/J3K7fkE1yfcmw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.0/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.0 h1:9ja34PaKybhCJjVKvxtDsUjbATUJGN+eF6QnO58u5cI= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.0/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod index cdbfc2730f4..efc29ed2691 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/aws/aws-sdk-go-v2 v1.30.0 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 - github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 + github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 github.com/aws/smithy-go v1.20.2 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel v1.27.0 diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum index fb2b78f801a..7dc1fc9425c 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum @@ -4,14 +4,14 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODt github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 h1:ZRxyyP9Tfkf5G9baYHvbd+/GvtKrzh3EBSgvcrkxVzY= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 h1:ur2U8zsOe1qmhlHgNVAg8P/HxSw8960K5ktDimxfK/Y= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13 h1:TiBHJdrItjSsvfMRMNEPvu4gFqor6aghaQ5mS18i77c= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13/go.mod h1:XN5B38yJn1XZvhyCeTzU5Ypha6+7UzVGj2w+aN0zn3k= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 h1:m/7a5OgAZQDWJlSbZLWg4BAlbXbY6j+dDDjPY8rZ7kA= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 h1:YWyd8KPykQE9YS7M+RTAlVyOmUxXiesIC2WtMMSEnX4= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod index b2f5e9cdf9e..bc7270842c9 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/aws/aws-sdk-go-v2 v1.30.0 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 - github.com/aws/aws-sdk-go-v2/service/route53 v1.41.1 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 + github.com/aws/aws-sdk-go-v2/service/route53 v1.42.0 github.com/aws/smithy-go v1.20.2 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.52.0 @@ -19,7 +19,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum index 5ab66e2ccfc..be7538a45e1 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum @@ -4,16 +4,16 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODt github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2 h1:ZRxyyP9Tfkf5G9baYHvbd+/GvtKrzh3EBSgvcrkxVzY= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.33.2/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0 h1:ur2U8zsOe1qmhlHgNVAg8P/HxSw8960K5ktDimxfK/Y= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.34.0/go.mod h1:zU5eWYw3HNkPtcrFwBAdMv3+h3dFpmB0ng7z8wOuSPc= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13 h1:TiBHJdrItjSsvfMRMNEPvu4gFqor6aghaQ5mS18i77c= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.13/go.mod h1:XN5B38yJn1XZvhyCeTzU5Ypha6+7UzVGj2w+aN0zn3k= -github.com/aws/aws-sdk-go-v2/service/route53 v1.41.1 h1:8evgBTGIqkBj8zWFZrjBExvC1/3Bgod5EHsmwmnHEy4= -github.com/aws/aws-sdk-go-v2/service/route53 v1.41.1/go.mod h1:aIGJVylrqjjBnf2NU2O1oHOOoBDFvHw6hy/GhelYksQ= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1 h1:m/7a5OgAZQDWJlSbZLWg4BAlbXbY6j+dDDjPY8rZ7kA= -github.com/aws/aws-sdk-go-v2/service/sqs v1.33.1/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= +github.com/aws/aws-sdk-go-v2/service/route53 v1.42.0 h1:eTLaQC3n6hjuiLEC/YYL5xV1JNfg+6BfhTjGdkTxoRc= +github.com/aws/aws-sdk-go-v2/service/route53 v1.42.0/go.mod h1:aIGJVylrqjjBnf2NU2O1oHOOoBDFvHw6hy/GhelYksQ= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0 h1:YWyd8KPykQE9YS7M+RTAlVyOmUxXiesIC2WtMMSEnX4= +github.com/aws/aws-sdk-go-v2/service/sqs v1.34.0/go.mod h1:4kCM5tMCkys9PFbuGHP+LjpxlsA5oMRUs3QvnWo11BM= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconvutil/netconv.go b/instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconvutil/netconv.go index c8456dee941..6ae340f0c3f 100644 --- a/instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconvutil/netconv.go +++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconvutil/netconv.go b/instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconvutil/netconv.go index 443712722e3..253014bf053 100644 --- a/instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconvutil/netconv.go +++ b/instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/github.com/gorilla/mux/otelmux/internal/semconvutil/netconv.go b/instrumentation/github.com/gorilla/mux/otelmux/internal/semconvutil/netconv.go index 333ff73e3d6..497fb802ad5 100644 --- a/instrumentation/github.com/gorilla/mux/otelmux/internal/semconvutil/netconv.go +++ b/instrumentation/github.com/gorilla/mux/otelmux/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go b/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go index 13e900b5ca1..15e4b340567 100644 --- a/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go +++ b/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go @@ -138,7 +138,7 @@ func TestNotFoundIsNotError(t *testing.T) { func assertSpan(t *testing.T, span sdktrace.ReadOnlySpan, name string, kind trace.SpanKind, attrs ...attribute.KeyValue) { assert.Equal(t, name, span.Name()) - assert.Equal(t, trace.SpanKindServer, span.SpanKind()) + assert.Equal(t, kind, span.SpanKind()) got := make(map[attribute.Key]attribute.Value, len(span.Attributes())) for _, a := range span.Attributes() { diff --git a/instrumentation/github.com/labstack/echo/otelecho/internal/semconvutil/netconv.go b/instrumentation/github.com/labstack/echo/otelecho/internal/semconvutil/netconv.go index 9313023b076..3fa96f45ab7 100644 --- a/instrumentation/github.com/labstack/echo/otelecho/internal/semconvutil/netconv.go +++ b/instrumentation/github.com/labstack/echo/otelecho/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/example/go.mod b/instrumentation/google.golang.org/grpc/otelgrpc/example/go.mod index ce7b69d079e..5b2b30b3cd0 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/example/go.mod +++ b/instrumentation/google.golang.org/grpc/otelgrpc/example/go.mod @@ -21,6 +21,6 @@ require ( go.opentelemetry.io/otel/metric v1.27.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/example/go.sum b/instrumentation/google.golang.org/grpc/otelgrpc/example/go.sum index a44d1781917..ee91a2fd3a4 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/example/go.sum +++ b/instrumentation/google.golang.org/grpc/otelgrpc/example/go.sum @@ -29,8 +29,8 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/go.mod b/instrumentation/google.golang.org/grpc/otelgrpc/go.mod index 741c2f00189..46b56f35638 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/go.mod +++ b/instrumentation/google.golang.org/grpc/otelgrpc/go.mod @@ -19,6 +19,6 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/go.sum b/instrumentation/google.golang.org/grpc/otelgrpc/go.sum index 21c167ef54b..7d23207962c 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/go.sum +++ b/instrumentation/google.golang.org/grpc/otelgrpc/go.sum @@ -23,8 +23,8 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/go.mod b/instrumentation/google.golang.org/grpc/otelgrpc/test/go.mod index 6d6df4ea3e2..49f64cdfdbd 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/go.mod +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/go.mod @@ -23,7 +23,7 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/go.sum b/instrumentation/google.golang.org/grpc/otelgrpc/test/go.sum index a2734a5d35e..411dcc0fa8f 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/go.sum +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/go.sum @@ -34,8 +34,8 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go index 991fad2efd6..42f4e368deb 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go @@ -635,7 +635,7 @@ func checkUnaryServerSpans(t *testing.T, spans []trace.ReadOnlySpan) { }, largeSpan.Attributes()) } -func assertEvents(t *testing.T, expected, actual []trace.Event) bool { +func assertEvents(t *testing.T, expected, actual []trace.Event) bool { //nolint:unparam if !assert.Len(t, actual, len(expected)) { return false } @@ -694,7 +694,7 @@ func checkUnaryServerRecords(t *testing.T, reader metric.Reader) { metricdatatest.AssertEqual(t, want, rm.ScopeMetrics[0], metricdatatest.IgnoreTimestamp(), metricdatatest.IgnoreValue()) } -func findAttribute(kvs []attribute.KeyValue, key attribute.Key) (attribute.KeyValue, bool) { +func findAttribute(kvs []attribute.KeyValue, key attribute.Key) (attribute.KeyValue, bool) { //nolint:unparam for _, kv := range kvs { if kv.Key == key { return kv, true diff --git a/instrumentation/gopkg.in/macaron.v1/otelmacaron/internal/semconvutil/netconv.go b/instrumentation/gopkg.in/macaron.v1/otelmacaron/internal/semconvutil/netconv.go index 1c3ce6c8587..be9910c8601 100644 --- a/instrumentation/gopkg.in/macaron.v1/otelmacaron/internal/semconvutil/netconv.go +++ b/instrumentation/gopkg.in/macaron.v1/otelmacaron/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go b/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go index 8bd08577e56..fc7e8474c72 100644 --- a/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go +++ b/instrumentation/net/http/httptrace/otelhttptrace/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go b/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go index d5c0093fc47..a9a9226b39a 100644 --- a/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go +++ b/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/instrumentation/runtime/internal/x/x_test.go b/instrumentation/runtime/internal/x/x_test.go index 86db0d845f0..fac942514ff 100644 --- a/instrumentation/runtime/internal/x/x_test.go +++ b/instrumentation/runtime/internal/x/x_test.go @@ -33,7 +33,7 @@ func run(steps ...func(*testing.T)) func(*testing.T) { } } -func setenv(k, v string) func(t *testing.T) { +func setenv(k, v string) func(t *testing.T) { //nolint:unparam return func(t *testing.T) { t.Setenv(k, v) } } diff --git a/internal/shared/semconvutil/netconv.go.tmpl b/internal/shared/semconvutil/netconv.go.tmpl index 541f14288ce..5d8ef05696b 100644 --- a/internal/shared/semconvutil/netconv.go.tmpl +++ b/internal/shared/semconvutil/netconv.go.tmpl @@ -92,7 +92,7 @@ func (c *netConv) Host(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) + attrs = append(attrs, c.HostPort(p)) } return attrs } @@ -138,7 +138,7 @@ func (c *netConv) Peer(address string) []attribute.KeyValue { attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) + attrs = append(attrs, c.PeerPort(p)) } return attrs } diff --git a/propagators/b3/b3_propagator.go b/propagators/b3/b3_propagator.go index 905cd71fe8c..45d0811a26e 100644 --- a/propagators/b3/b3_propagator.go +++ b/propagators/b3/b3_propagator.go @@ -262,11 +262,11 @@ func extractSingle(ctx context.Context, contextHeader string) (context.Context, case string(contextHeader[traceID64BitsWidth]) == "-": // traceID must be 64 bits pos += traceID64BitsWidth // {traceID} - traceID = b3TraceIDPadding + string(contextHeader[0:pos]) + traceID = b3TraceIDPadding + contextHeader[0:pos] case string(contextHeader[32]) == "-": // traceID must be 128 bits pos += traceID128BitsWidth // {traceID} - traceID = string(contextHeader[0:pos]) + traceID = contextHeader[0:pos] default: return ctx, empty, errInvalidTraceIDValue } @@ -277,6 +277,9 @@ func extractSingle(ctx context.Context, contextHeader string) (context.Context, } pos += separatorWidth // {traceID}- + if headerLen < pos+spanIDWidth { + return ctx, empty, errInvalidSpanIDValue + } scc.SpanID, err = trace.SpanIDFromHex(contextHeader[pos : pos+spanIDWidth]) if err != nil { return ctx, empty, errInvalidSpanIDValue diff --git a/propagators/b3/b3_propagator_test.go b/propagators/b3/b3_propagator_test.go index bac1893f4e5..f111d38247b 100644 --- a/propagators/b3/b3_propagator_test.go +++ b/propagators/b3/b3_propagator_test.go @@ -216,6 +216,18 @@ func TestExtractSingle(t *testing.T) { {"3", trace.SpanContextConfig{}, errInvalidSampledByte, false, false}, {"000000000000007b", trace.SpanContextConfig{}, errInvalidScope, false, false}, {"000000000000007b00000000000001c8", trace.SpanContextConfig{}, errInvalidScope, false, false}, + // TraceID with illegal length + { + "000001c8-000000000000007b", + trace.SpanContextConfig{}, + errInvalidTraceIDValue, false, false, + }, + // SpanID with illegal length + { + "000000000000007b00000000000001c8-0000007b", + trace.SpanContextConfig{}, + errInvalidSpanIDValue, false, false, + }, // Support short trace IDs. { "00000000000001c8-000000000000007b", diff --git a/propagators/opencensus/examples/go.mod b/propagators/opencensus/examples/go.mod index ab0bf76b69d..27e5d138635 100644 --- a/propagators/opencensus/examples/go.mod +++ b/propagators/opencensus/examples/go.mod @@ -24,7 +24,7 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/propagators/opencensus/examples/go.sum b/propagators/opencensus/examples/go.sum index 639aa490cc7..8ddb409aeea 100644 --- a/propagators/opencensus/examples/go.sum +++ b/propagators/opencensus/examples/go.sum @@ -106,8 +106,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/samplers/aws/xray/fallback_sampler.go b/samplers/aws/xray/fallback_sampler.go index 728cadc5938..2b23704aac8 100644 --- a/samplers/aws/xray/fallback_sampler.go +++ b/samplers/aws/xray/fallback_sampler.go @@ -50,7 +50,7 @@ func (fs *FallbackSampler) Description() string { } // take consumes quota from reservoir, if any remains, then returns true. False otherwise. -func (fs *FallbackSampler) take(now time.Time, itemCost float64) bool { +func (fs *FallbackSampler) take(now time.Time, itemCost float64) bool { //nolint:unparam fs.mu.Lock() defer fs.mu.Unlock() diff --git a/samplers/aws/xray/internal/client.go b/samplers/aws/xray/internal/client.go index faee4498f4e..d7f0d345b53 100644 --- a/samplers/aws/xray/internal/client.go +++ b/samplers/aws/xray/internal/client.go @@ -107,7 +107,7 @@ type xrayClient struct { } // newClient returns an HTTP client with proxy endpoint. -func newClient(endpoint url.URL) (client *xrayClient, err error) { +func newClient(endpoint url.URL) (client *xrayClient, err error) { //nolint:unparam // Construct resolved URLs for getSamplingRules and getSamplingTargets API calls. endpoint.Path = "/GetSamplingRules" samplingRulesURL := endpoint diff --git a/samplers/aws/xray/internal/manifest.go b/samplers/aws/xray/internal/manifest.go index 2d4d7dfa1a2..78b5f20588a 100644 --- a/samplers/aws/xray/internal/manifest.go +++ b/samplers/aws/xray/internal/manifest.go @@ -289,7 +289,7 @@ func (m *Manifest) updateReservoir(t *samplingTargetDocument) (err error) { // snapshots takes a snapshot of sampling statistics from all rules, resetting // statistics counters in the process. -func (m *Manifest) snapshots() ([]*samplingStatisticsDocument, error) { +func (m *Manifest) snapshots() ([]*samplingStatisticsDocument, error) { //nolint:unparam statistics := make([]*samplingStatisticsDocument, 0, len(m.Rules)) // Generate sampling statistics for user-defined rules. diff --git a/samplers/aws/xray/internal/manifest_test.go b/samplers/aws/xray/internal/manifest_test.go index e6c9654d2f4..4bb6706938d 100644 --- a/samplers/aws/xray/internal/manifest_test.go +++ b/samplers/aws/xray/internal/manifest_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" ) -func createSamplingTargetDocument(name string, interval int64, rate, quota, ttl float64) *samplingTargetDocument { +func createSamplingTargetDocument(name string, interval int64, rate, quota, ttl float64) *samplingTargetDocument { //nolint:unparam return &samplingTargetDocument{ FixedRate: &rate, Interval: &interval, diff --git a/samplers/aws/xray/internal/reservoir.go b/samplers/aws/xray/internal/reservoir.go index 3b41e2a1dcf..62412f6e51d 100644 --- a/samplers/aws/xray/internal/reservoir.go +++ b/samplers/aws/xray/internal/reservoir.go @@ -44,7 +44,7 @@ func (r *reservoir) expired(now time.Time) bool { } // take consumes quota from reservoir, if any remains, then returns true. False otherwise. -func (r *reservoir) take(now time.Time, borrowed bool, itemCost float64) bool { // nolint: revive // borrowed is not a control flag. +func (r *reservoir) take(now time.Time, borrowed bool, itemCost float64) bool { // nolint:unparam,revive // borrowed is not a control flag. r.mu.Lock() defer r.mu.Unlock() diff --git a/samplers/jaegerremote/example/go.mod b/samplers/jaegerremote/example/go.mod index 034aafc7fef..a4aa2c9348a 100644 --- a/samplers/jaegerremote/example/go.mod +++ b/samplers/jaegerremote/example/go.mod @@ -17,7 +17,7 @@ require ( go.opentelemetry.io/otel/metric v1.27.0 // indirect go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/sys v0.21.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/samplers/jaegerremote/example/go.sum b/samplers/jaegerremote/example/go.sum index c22cd611d11..76e57721682 100644 --- a/samplers/jaegerremote/example/go.sum +++ b/samplers/jaegerremote/example/go.sum @@ -54,8 +54,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/samplers/jaegerremote/go.mod b/samplers/jaegerremote/go.mod index 8a63326fb42..75874f7e215 100644 --- a/samplers/jaegerremote/go.mod +++ b/samplers/jaegerremote/go.mod @@ -8,7 +8,7 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel/sdk v1.27.0 go.opentelemetry.io/otel/trace v1.27.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d ) require ( diff --git a/samplers/jaegerremote/go.sum b/samplers/jaegerremote/go.sum index 436412f7243..7f481de9109 100644 --- a/samplers/jaegerremote/go.sum +++ b/samplers/jaegerremote/go.sum @@ -52,8 +52,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=