diff --git a/CHANGELOG.md b/CHANGELOG.md index fbaca043537..8308e1fd79b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add the new `go.opentelemetry.io/contrib/instrgen` package to provide auto-generated source code instrumentation. (#3068, #3108) +### Changed + +- The semantic conventions used by `go.opentelemetry.io/contrib/detectors/aws/ec2` have been upgraded to v1.21.0. (#4265) +- The semantic conventions used by `go.opentelemetry.io/contrib/detectors/aws/ecs` have been upgraded to v1.21.0. (#4265) +- The semantic conventions used by `go.opentelemetry.io/contrib/detectors/aws/eks` have been upgraded to v1.21.0. (#4265) +- The semantic conventions used by `go.opentelemetry.io/contrib/detectors/aws/lambda` have been upgraded to v1.21.0. (#4265) +- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda` have been upgraded to v1.21.0. (#4265) + - The `faas.execution` attribute is now `faas.invocation_id`. + - The `faas.id` attribute is now `aws.lambda.invoked_arn`. +- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws` have been upgraded to v1.21.0. (#4265) + ## [1.18.0/0.43.0/0.12.0] - 2023-08-28 ### Added @@ -28,6 +39,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Change interceptors in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` to disable `SENT`/`RECEIVED` events. Use `WithMessageEvents()` to turn back on. (#3964) +### Changed + +- `go.opentelemetry.io/contrib/detectors/gcp`: Detect `faas.instance` instead of `faas.id`, since `faas.id` is being removed. (#4198) + ### Fixed - AWS XRay Remote Sampling to cap `quotaBalance` to 1x quota in `go.opentelemetry.io/contrib/samplers/aws/xray`. (#3651, #3652) @@ -49,6 +64,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The `go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego` module is deprecated. (#4092, #4104) - The `go.opentelemetry.io/contrib/instrumentation/github.com/go-kit/kit/otelkit` module is deprecated. (#4093, #4104) - The `go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama` module is deprecated. (#4099) +- The `go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache` module is deprecated. (#4164) +- The `go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql` module is deprecated. (#4164) ### Removed diff --git a/detectors/aws/ec2/ec2.go b/detectors/aws/ec2/ec2.go index 91bdc19e8a2..f0c10c3218f 100644 --- a/detectors/aws/ec2/ec2.go +++ b/detectors/aws/ec2/ec2.go @@ -25,7 +25,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) type config struct { diff --git a/detectors/aws/ec2/ec2_test.go b/detectors/aws/ec2/ec2_test.go index e9f881e3640..b489ebeef1d 100644 --- a/detectors/aws/ec2/ec2_test.go +++ b/detectors/aws/ec2/ec2_test.go @@ -28,7 +28,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) func TestAWS_Detect(t *testing.T) { diff --git a/detectors/aws/ecs/ecs.go b/detectors/aws/ecs/ecs.go index 8063c01e46b..c1782d026f5 100644 --- a/detectors/aws/ecs/ecs.go +++ b/detectors/aws/ecs/ecs.go @@ -27,7 +27,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) const ( diff --git a/detectors/aws/ecs/ecs_test.go b/detectors/aws/ecs/ecs_test.go index fe4624a6932..01ee209424a 100644 --- a/detectors/aws/ecs/ecs_test.go +++ b/detectors/aws/ecs/ecs_test.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" metadata "github.com/brunoscheufler/aws-ecs-metadata-go" "github.com/stretchr/testify/assert" diff --git a/detectors/aws/ecs/test/ecs_test.go b/detectors/aws/ecs/test/ecs_test.go index 8611ab9ffa1..090e4f83b84 100644 --- a/detectors/aws/ecs/test/ecs_test.go +++ b/detectors/aws/ecs/test/ecs_test.go @@ -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.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "github.com/stretchr/testify/assert" ) diff --git a/detectors/aws/eks/detector.go b/detectors/aws/eks/detector.go index b5e0dba83a6..653707506f2 100644 --- a/detectors/aws/eks/detector.go +++ b/detectors/aws/eks/detector.go @@ -27,7 +27,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) const ( diff --git a/detectors/aws/eks/detector_test.go b/detectors/aws/eks/detector_test.go index 5dd64098a1d..c6fcd45e315 100644 --- a/detectors/aws/eks/detector_test.go +++ b/detectors/aws/eks/detector_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) type MockDetectorUtils struct { diff --git a/detectors/aws/lambda/detector.go b/detectors/aws/lambda/detector.go index bad46d27d2e..73a3357f9e3 100644 --- a/detectors/aws/lambda/detector.go +++ b/detectors/aws/lambda/detector.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) // For a complete list of reserved environment variables in Lambda, see: diff --git a/detectors/aws/lambda/detector_test.go b/detectors/aws/lambda/detector_test.go index 77c636ac2ba..8d45f7ceb96 100644 --- a/detectors/aws/lambda/detector_test.go +++ b/detectors/aws/lambda/detector_test.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) // successfully return resource when process is running on Amazon Lambda environment. diff --git a/detectors/gcp/detector.go b/detectors/gcp/detector.go index 50b2f2736a1..9b1edf620e3 100644 --- a/detectors/gcp/detector.go +++ b/detectors/gcp/detector.go @@ -60,27 +60,27 @@ func (d *detector) Detect(ctx context.Context) (*resource.Resource, error) { b.attrs = append(b.attrs, semconv.CloudPlatformGCPCloudRun) b.add(semconv.FaaSNameKey, d.detector.FaaSName) b.add(semconv.FaaSVersionKey, d.detector.FaaSVersion) - b.add(semconv.FaaSIDKey, d.detector.FaaSID) + b.add(semconv.FaaSInstanceKey, d.detector.FaaSID) b.add(semconv.CloudRegionKey, d.detector.FaaSCloudRegion) case gcp.CloudFunctions: b.attrs = append(b.attrs, semconv.CloudPlatformGCPCloudFunctions) b.add(semconv.FaaSNameKey, d.detector.FaaSName) b.add(semconv.FaaSVersionKey, d.detector.FaaSVersion) - b.add(semconv.FaaSIDKey, d.detector.FaaSID) + b.add(semconv.FaaSInstanceKey, d.detector.FaaSID) b.add(semconv.CloudRegionKey, d.detector.FaaSCloudRegion) case gcp.AppEngineFlex: b.attrs = append(b.attrs, semconv.CloudPlatformGCPAppEngine) b.addZoneAndRegion(d.detector.AppEngineFlexAvailabilityZoneAndRegion) b.add(semconv.FaaSNameKey, d.detector.AppEngineServiceName) b.add(semconv.FaaSVersionKey, d.detector.AppEngineServiceVersion) - b.add(semconv.FaaSIDKey, d.detector.AppEngineServiceInstance) + b.add(semconv.FaaSInstanceKey, d.detector.AppEngineServiceInstance) case gcp.AppEngineStandard: b.attrs = append(b.attrs, semconv.CloudPlatformGCPAppEngine) b.add(semconv.CloudAvailabilityZoneKey, d.detector.AppEngineStandardAvailabilityZone) b.add(semconv.CloudRegionKey, d.detector.AppEngineStandardCloudRegion) b.add(semconv.FaaSNameKey, d.detector.AppEngineServiceName) b.add(semconv.FaaSVersionKey, d.detector.AppEngineServiceVersion) - b.add(semconv.FaaSIDKey, d.detector.AppEngineServiceInstance) + b.add(semconv.FaaSInstanceKey, d.detector.AppEngineServiceInstance) case gcp.GCE: b.attrs = append(b.attrs, semconv.CloudPlatformGCPComputeEngine) b.addZoneAndRegion(d.detector.GCEAvailabilityZoneAndRegion) diff --git a/detectors/gcp/detector_test.go b/detectors/gcp/detector_test.go index 9085d2322af..4af146c5290 100644 --- a/detectors/gcp/detector_test.go +++ b/detectors/gcp/detector_test.go @@ -113,7 +113,7 @@ func TestDetect(t *testing.T) { semconv.CloudRegion("us-central1"), semconv.FaaSName("my-service"), semconv.FaaSVersion("123456"), - semconv.FaaSID("1472385723456792345"), + semconv.FaaSInstance("1472385723456792345"), ), }, { @@ -133,7 +133,7 @@ func TestDetect(t *testing.T) { semconv.CloudRegion("us-central1"), semconv.FaaSName("my-service"), semconv.FaaSVersion("123456"), - semconv.FaaSID("1472385723456792345"), + semconv.FaaSInstance("1472385723456792345"), ), }, { @@ -155,7 +155,7 @@ func TestDetect(t *testing.T) { semconv.CloudAvailabilityZone("us-central1-c"), semconv.FaaSName("my-service"), semconv.FaaSVersion("123456"), - semconv.FaaSID("1472385723456792345"), + semconv.FaaSInstance("1472385723456792345"), ), }, { @@ -177,7 +177,7 @@ func TestDetect(t *testing.T) { semconv.CloudAvailabilityZone("us-central1-c"), semconv.FaaSName("my-service"), semconv.FaaSVersion("123456"), - semconv.FaaSID("1472385723456792345"), + semconv.FaaSInstance("1472385723456792345"), ), }, { diff --git a/instrumentation/README.md b/instrumentation/README.md index ec8d072d912..93951140fad 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -43,10 +43,8 @@ The following instrumentation packages are provided for popular Go packages and | Instrumentation Package | Metrics | Traces | | :---------------------: | :-----: | :----: | | [github.com/aws/aws-sdk-go-v2](./github.com/aws/aws-sdk-go-v2/otelaws)| | ✓ | -| [github.com/bradfitz/gomemcache](./github.com/bradfitz/gomemcache/memcache/otelmemcache) | | ✓ | | [github.com/emicklei/go-restful](./github.com/emicklei/go-restful/otelrestful) | | ✓ | | [github.com/gin-gonic/gin](./github.com/gin-gonic/gin/otelgin) | | ✓ | -| [github.com/gocql/gocql](./github.com/gocql/gocql/otelgocql) | ✓ | ✓ | | [github.com/gorilla/mux](./github.com/gorilla/mux/otelmux) | | ✓ | | [github.com/labstack/echo](./github.com/labstack/echo/otelecho) | | ✓ | | [go.mongodb.org/mongo-driver](./go.mongodb.org/mongo-driver/mongo/otelmongo) | | ✓ | @@ -57,7 +55,6 @@ The following instrumentation packages are provided for popular Go packages and | [net/http/httptrace](./net/http/httptrace/otelhttptrace) | | ✓ | | [runtime](./runtime) | ✓ | | - ## Organization In order to ensure the maintainability and discoverability of instrumentation packages, the following guidelines MUST be followed. @@ -66,7 +63,7 @@ In order to ensure the maintainability and discoverability of instrumentation pa All instrumentation packages SHOULD be of the form: -``` +```sh go.opentelemetry.io/contrib/instrumentation/{IMPORT_PATH}/otel{PACKAGE_NAME} ``` @@ -90,7 +87,7 @@ Additionally the following guidelines for package composition need to be followe Therefore, an appropriately configured `go.mod` and `go.sum` need to exist for each package. - To help understand the instrumentation a Go package documentation SHOULD be included. This documentation SHOULD be in a dedicated `doc.go` file if the package is more than one file. - It SHOULD contain useful information like what the purpose of the instrumentation is, how to use it, and any compatibility restrictions that might exist. + It SHOULD contain useful information like what the purpose of the instrumentation is, how to use it, and any compatibility restrictions that might exist. - Examples of how to actually use the instrumentation SHOULD be included. - All instrumentation packages MUST provide an option to accept a `TracerProvider` if it uses a Tracer, a `MeterProvider` if it uses a Meter, and `Propagators` if it handles any context propagation. Also, packages MUST use the default `TracerProvider`, `MeterProvider`, and `Propagators` supplied by the `global` package if no optional one is provided. diff --git a/instrumentation/github.com/Shopify/sarama/otelsarama/example/go.mod b/instrumentation/github.com/Shopify/sarama/otelsarama/example/go.mod index 4defe1368de..546456a1a75 100644 --- a/instrumentation/github.com/Shopify/sarama/otelsarama/example/go.mod +++ b/instrumentation/github.com/Shopify/sarama/otelsarama/example/go.mod @@ -1,3 +1,5 @@ +// Deprecated: This module is no longer supported. +// github.com/Shopify/sarama moved to github.com/IBM/sarama. module go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama/example go 1.18 diff --git a/instrumentation/github.com/astaxie/beego/otelbeego/example/go.mod b/instrumentation/github.com/astaxie/beego/otelbeego/example/go.mod index 7229e389ff6..3789a63fba9 100644 --- a/instrumentation/github.com/astaxie/beego/otelbeego/example/go.mod +++ b/instrumentation/github.com/astaxie/beego/otelbeego/example/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module is no longer supported. module go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego/example go 1.18 diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/lambda.go b/instrumentation/github.com/aws/aws-lambda-go/otellambda/lambda.go index 35ee635d08e..b08c6813b88 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/lambda.go +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/lambda.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "go.opentelemetry.io/otel/trace" ) @@ -72,7 +72,7 @@ func (i *instrumentor) tracingBegin(ctx context.Context, eventJSON []byte) (cont } if lc != nil { ctxRequestID := lc.AwsRequestID - attributes = append(attributes, semconv.FaaSExecution(ctxRequestID)) + attributes = append(attributes, semconv.FaaSInvocationID(ctxRequestID)) // Some resource attrs added as span attrs because lambda // resource detectors are created before a lambda @@ -80,7 +80,7 @@ func (i *instrumentor) tracingBegin(ctx context.Context, eventJSON []byte) (cont // Create these attrs upon first invocation if len(i.resAttrs) == 0 { ctxFunctionArn := lc.InvokedFunctionArn - attributes = append(attributes, semconv.FaaSID(ctxFunctionArn)) + attributes = append(attributes, semconv.AWSLambdaInvokedARN(ctxFunctionArn)) arnParts := strings.Split(ctxFunctionArn, ":") if len(arnParts) >= 5 { attributes = append(attributes, semconv.CloudAccountID(arnParts[4])) diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/test/lambda_test.go b/instrumentation/github.com/aws/aws-lambda-go/otellambda/test/lambda_test.go index b6734b1ca4b..e1cb7d2d3d1 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/test/lambda_test.go +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/test/lambda_test.go @@ -40,7 +40,7 @@ import ( "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "go.opentelemetry.io/otel/trace" ) @@ -136,8 +136,8 @@ var ( SpanKind: trace.SpanKindServer, StartTime: time.Time{}, EndTime: time.Time{}, - Attributes: []attribute.KeyValue{attribute.String("faas.execution", "123"), - attribute.String("faas.id", "arn:partition:service:region:account-id:resource-type:resource-id"), + Attributes: []attribute.KeyValue{attribute.String("faas.invocation_id", "123"), + attribute.String("aws.lambda.invoked_arn", "arn:partition:service:region:account-id:resource-type:resource-id"), attribute.String("cloud.account.id", "account-id")}, Events: nil, Links: nil, @@ -326,8 +326,8 @@ var ( SpanKind: trace.SpanKindServer, StartTime: time.Time{}, EndTime: time.Time{}, - Attributes: []attribute.KeyValue{attribute.String("faas.execution", "123"), - attribute.String("faas.id", "arn:partition:service:region:account-id:resource-type:resource-id"), + Attributes: []attribute.KeyValue{attribute.String("faas.invocation_id", "123"), + attribute.String("aws.lambda.invoked_arn", "arn:partition:service:region:account-id:resource-type:resource-id"), attribute.String("cloud.account.id", "account-id")}, Events: nil, Links: nil, diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig_test.go b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig_test.go index 2965fa07113..b32080f0ce7 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig_test.go +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig_test.go @@ -102,8 +102,8 @@ var ( Kind: v1trace.Span_SPAN_KIND_SERVER, StartTimeUnixNano: 0, EndTimeUnixNano: 0, - Attributes: []*v1common.KeyValue{{Key: "faas.execution", Value: &v1common.AnyValue{Value: &v1common.AnyValue_StringValue{StringValue: "123"}}}, - {Key: "faas.id", Value: &v1common.AnyValue{Value: &v1common.AnyValue_StringValue{StringValue: "arn:partition:service:region:account-id:resource-type:resource-id"}}}, + Attributes: []*v1common.KeyValue{{Key: "faas.invocation_id", Value: &v1common.AnyValue{Value: &v1common.AnyValue_StringValue{StringValue: "123"}}}, + {Key: "aws.lambda.invoked_arn", Value: &v1common.AnyValue{Value: &v1common.AnyValue_StringValue{StringValue: "arn:partition:service:region:account-id:resource-type:resource-id"}}}, {Key: "cloud.account.id", Value: &v1common.AnyValue{Value: &v1common.AnyValue_StringValue{StringValue: "account-id"}}}}, DroppedAttributesCount: 0, Events: nil, diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go index bfe74ca6b86..a233b73a433 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go @@ -23,7 +23,7 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) // AWS attributes. diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go index 455be3d9aef..abc0f4bd208 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) func TestOperationAttr(t *testing.T) { diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go index be38e05006d..7889c827963 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go @@ -26,7 +26,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/propagation" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "go.opentelemetry.io/otel/trace" ) diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go index 6f37605b48a..6fe93b8b199 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go @@ -22,7 +22,7 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) // DynamoDBAttributeSetter sets DynamoDB specific attributes depending on the DynamoDB operation being performed. diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go index 585485a2d13..0be72658388 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go @@ -21,7 +21,7 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) // SQSAttributeSetter sets SQS specific attributes depending on the SQS operation being performed. diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go index 1ae348b7ebb..c6599543237 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go @@ -23,7 +23,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/stretchr/testify/assert" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" ) func TestSQSDeleteMessageBatchInput(t *testing.T) { diff --git a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/doc.go b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/doc.go index 177e593d0ea..9f906812057 100644 --- a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/doc.go +++ b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/doc.go @@ -19,4 +19,6 @@ // // The instrumentation works by wrapping the memcached client by calling // `NewClientWithTracing` and tracing it's every operation. +// +// Deprecated: This module is no longer supported. package otelmemcache // import "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache" diff --git a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/example/client.go b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/example/client.go index fd9c3d16325..d7fe9ce50cb 100644 --- a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/example/client.go +++ b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/example/client.go @@ -21,7 +21,7 @@ import ( "github.com/bradfitz/gomemcache/memcache" - "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache" + "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache" //nolint:staticcheck // This is deprecated and will be removed in the next release. oteltracestdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" sdktrace "go.opentelemetry.io/otel/sdk/trace" diff --git a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/go.mod b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/go.mod index 6f4942c7dd7..412e99a035c 100644 --- a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/go.mod +++ b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module is no longer supported. module go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache go 1.19 diff --git a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test/gomemcache_test.go b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test/gomemcache_test.go index 7d29fd859b4..c229de0064b 100644 --- a/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test/gomemcache_test.go +++ b/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test/gomemcache_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache" + "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache" //nolint:staticcheck // This is deprecated and will be removed in the next release. "go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/internal" "go.opentelemetry.io/contrib/internal/util" "go.opentelemetry.io/otel/codes" diff --git a/instrumentation/github.com/go-kit/kit/otelkit/example/go.mod b/instrumentation/github.com/go-kit/kit/otelkit/example/go.mod index 08bc8e6d206..b6f7bf56475 100644 --- a/instrumentation/github.com/go-kit/kit/otelkit/example/go.mod +++ b/instrumentation/github.com/go-kit/kit/otelkit/example/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module is no longer supported. module go.opentelemetry.io/contrib/instrumentation/github.com/go-kit/kit/otelkit/example go 1.18 diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/doc.go b/instrumentation/github.com/gocql/gocql/otelgocql/doc.go index a28c5face2e..b15c5354603 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/doc.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/doc.go @@ -13,4 +13,6 @@ // limitations under the License. // Package otelgocql instruments the github.com/gocql/gocql package. +// +// Deprecated: This module is no longer supported. package otelgocql // import "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql" diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/example/client.go b/instrumentation/github.com/gocql/gocql/otelgocql/example/client.go index 0797803a860..9349e7be0da 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/example/client.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/example/client.go @@ -48,7 +48,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql" + "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql" //nolint:staticcheck // This is deprecated and will be removed in the next release. ) const keyspace = "gocql_integration_example" diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/example/doc.go b/instrumentation/github.com/gocql/gocql/otelgocql/example/doc.go index 558f5bee2df..a57be4f3412 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/example/doc.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/example/doc.go @@ -13,4 +13,6 @@ // limitations under the License. // Package main provides an example use of the otelgocql instrumentation. +// +// Deprecated: This module is no longer supported. package main diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod index 8c9f2e9f4b4..2ecc4c394dc 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod +++ b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module is no longer supported. module go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql/example go 1.18 diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/go.mod b/instrumentation/github.com/gocql/gocql/otelgocql/go.mod index ec4610a2d49..fad543eb542 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/go.mod +++ b/instrumentation/github.com/gocql/gocql/otelgocql/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module is no longer supported. module go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql go 1.19 diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go b/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go index ddacd2df72d..0479b98a8ef 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql" + "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql" //nolint:staticcheck // This is deprecated and will be removed in the next release. "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql/internal" "go.opentelemetry.io/contrib/internal/util" "go.opentelemetry.io/otel/attribute" diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go index 68b3473bc03..561154061fe 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go @@ -501,10 +501,13 @@ func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor { // spanInfo returns a span name and all appropriate attributes from the gRPC // method and peer address. func spanInfo(fullMethod, peerAddress string) (string, []attribute.KeyValue) { - attrs := []attribute.KeyValue{RPCSystemGRPC} name, mAttrs := internal.ParseFullMethod(fullMethod) + peerAttrs := peerAttr(peerAddress) + + attrs := make([]attribute.KeyValue, 0, 1+len(mAttrs)+len(peerAttrs)) + attrs = append(attrs, RPCSystemGRPC) attrs = append(attrs, mAttrs...) - attrs = append(attrs, peerAttr(peerAddress)...) + attrs = append(attrs, peerAttrs...) return name, attrs } @@ -512,7 +515,7 @@ func spanInfo(fullMethod, peerAddress string) (string, []attribute.KeyValue) { func peerAttr(addr string) []attribute.KeyValue { host, p, err := net.SplitHostPort(addr) if err != nil { - return []attribute.KeyValue(nil) + return nil } if host == "" { @@ -520,7 +523,7 @@ func peerAttr(addr string) []attribute.KeyValue { } port, err := strconv.Atoi(p) if err != nil { - return []attribute.KeyValue(nil) + return nil } var attr []attribute.KeyValue diff --git a/zpages/doc.go b/zpages/doc.go new file mode 100644 index 00000000000..e663fa1c2ee --- /dev/null +++ b/zpages/doc.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package zpages implements a collection of HTML pages that display +// telemetry stats. +package zpages // import "go.opentelemetry.io/contrib/zpages"