Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to semconv/v1.17.0 #3182

Merged
merged 13 commits into from
Jan 28, 2023
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `otelmux`: Add new `WithSpanNameFormatter` option to `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux` to allow customizing span names. (#3041)
- Add missing recommended AWS Lambda resource attributes `faas.instance` and `faas.max_memory` in `go.opentelemetry.io/contrib/detectors/aws/lambda`. (#3148)
- Improve documentation for `samplers/jaegerremote` by providing examples of sampling endpoints. (#3147)
- Add `WithServerName` to `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` to set the primary server name of a `Handler`. (#3182)

### Changed

- Updated to the new metric API. (#3170)
- `otelgrpc`: Remove expensive calculation of uncompressed message size attribute. (#3168)
- Upgrade all `semconv` packages to use `v1.17.0`. (#3182)

## [1.12.0/0.37.0/0.6.0]

Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ec2/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

type config struct {
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ec2/ec2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

func TestAWS_Detect(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ec2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/aws/aws-sdk-go v1.44.184
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
)

Expand Down
4 changes: 2 additions & 2 deletions detectors/aws/ec2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ecs/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ecs/ecs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ecs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
)

Expand Down
4 changes: 2 additions & 2 deletions detectors/aws/ecs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/ecs/test/ecs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
ecs "go.opentelemetry.io/contrib/detectors/aws/ecs"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/eks/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/eks/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

type MockDetectorUtils struct {
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/eks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
Expand Down
4 changes: 2 additions & 2 deletions detectors/aws/eks/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/lambda/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

// For a complete list of reserved environment variables in Lambda, see:
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/lambda/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

// successfully return resource when process is running on Amazon Lambda environment.
Expand Down
2 changes: 1 addition & 1 deletion detectors/aws/lambda/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
)

Expand Down
4 changes: 2 additions & 2 deletions detectors/aws/lambda/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/cloud-function.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/cloud-function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/cloud-run.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

const serviceNamespace = "cloud-run-managed"
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

// NewDetector returns a resource detector which detects resource attributes on:
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/assert"

"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

func TestDetect(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

// GCE collects resource information of GCE computing instances.
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
)

// GKE collects resource information of GKE computing instances.
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.34.2
github.com/google/go-cmp v0.5.9
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
)

Expand Down
4 changes: 2 additions & 2 deletions detectors/gcp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/Shopify/sarama"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -63,10 +63,10 @@ func (w *consumerMessagesDispatcherWrapper) Run() {
attrs := []attribute.KeyValue{
semconv.MessagingSystemKey.String("kafka"),
semconv.MessagingDestinationKindTopic,
semconv.MessagingDestinationKey.String(msg.Topic),
semconv.MessagingDestinationNameKey.String(msg.Topic),
semconv.MessagingOperationReceive,
semconv.MessagingMessageIDKey.String(strconv.FormatInt(msg.Offset, 10)),
semconv.MessagingKafkaPartitionKey.Int64(int64(msg.Partition)),
semconv.MessagingKafkaSourcePartitionKey.Int64(int64(msg.Partition)),
}
opts := []trace.SpanStartOption{
trace.WithAttributes(attrs...),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/Shopify/sarama"

"go.opentelemetry.io/otel"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/ot
require (
github.com/Shopify/sarama v1.38.0
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.37.0
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2
go.opentelemetry.io/otel/sdk v1.11.2
go.opentelemetry.io/otel/trace v1.11.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2 h1:BhEVgvuE1NWLLuMLvC6sif791F45KFHi5GhOs1KunZU=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2/go.mod h1:bx//lU66dPzNT+Y0hHA12ciKoMOH9iixEwCqC1OeQWQ=
go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/Shopify/sarama v1.38.0
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/trace v1.11.2
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6 h1:BBMki5cl4HIYsswWSZ/WBnD1pkpQzZ7VyAK46S7QeNE=
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"go.opentelemetry.io/otel/codes"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -287,7 +287,7 @@ func startProducerSpan(cfg config, version sarama.KafkaVersion, msg *sarama.Prod
attrs := []attribute.KeyValue{
semconv.MessagingSystemKey.String("kafka"),
semconv.MessagingDestinationKindTopic,
semconv.MessagingDestinationKey.String(msg.Topic),
semconv.MessagingDestinationNameKey.String(msg.Topic),
semconv.MessagingMessagePayloadSizeBytesKey.Int(msgPayloadSize(msg, version)),
semconv.MessagingOperationKey.String("send"),
}
Expand All @@ -308,7 +308,7 @@ func startProducerSpan(cfg config, version sarama.KafkaVersion, msg *sarama.Prod
func finishProducerSpan(span trace.Span, partition int32, offset int64, err error) {
span.SetAttributes(
semconv.MessagingMessageIDKey.String(strconv.FormatInt(offset, 10)),
semconv.MessagingKafkaPartitionKey.Int64(int64(partition)),
semconv.MessagingKafkaDestinationPartitionKey.Int64(int64(partition)),
)
if err != nil {
span.SetStatus(codes.Error, err.Error())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -109,10 +109,10 @@ func consumeAndCheck(t *testing.T, mt trace.Tracer, complFn func() []sdktrace.Re
attributeList: []attribute.KeyValue{
semconv.MessagingSystemKey.String("kafka"),
semconv.MessagingDestinationKindTopic,
semconv.MessagingDestinationKey.String("test-topic"),
semconv.MessagingDestinationNameKey.String("test-topic"),
semconv.MessagingOperationReceive,
semconv.MessagingMessageIDKey.String("0"),
semconv.MessagingKafkaPartitionKey.Int64(0),
semconv.MessagingKafkaSourcePartitionKey.Int64(0),
},
parentSpanID: trace.SpanContextFromContext(ctx).SpanID(),
kind: trace.SpanKindConsumer,
Expand All @@ -122,10 +122,10 @@ func consumeAndCheck(t *testing.T, mt trace.Tracer, complFn func() []sdktrace.Re
attributeList: []attribute.KeyValue{
semconv.MessagingSystemKey.String("kafka"),
semconv.MessagingDestinationKindTopic,
semconv.MessagingDestinationKey.String("test-topic"),
semconv.MessagingDestinationNameKey.String("test-topic"),
semconv.MessagingOperationReceive,
semconv.MessagingMessageIDKey.String("1"),
semconv.MessagingKafkaPartitionKey.Int64(0),
semconv.MessagingKafkaSourcePartitionKey.Int64(0),
},
kind: trace.SpanKindConsumer,
msgKey: []byte("foo2"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Shopify/sarama v1.38.0
github.com/stretchr/testify v1.8.1
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.37.0
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel v1.11.3-0.20230126195513-af3db6e8bed6
go.opentelemetry.io/otel/sdk v1.11.2
go.opentelemetry.io/otel/trace v1.11.2
)
Expand Down
Loading