Upgrade to semconv/v1.40.0#8631
Merged
Merged
Conversation
Sync go.opentelemetry.io/otel dependencies across modules\nusing make update-all-otel-deps at opentelemetry-go commit 4986fd06bff1219e8984166e52c919db8754191a.
Migrate active semconv imports and shared semconv templates to v1.40.0.\nKeep intentional legacy semconv compatibility code untouched.\nAdjust otelgrpc stats handling tests for removed RPC message attributes\nand removed request/response size RPC metrics in semconv v1.40.0.\nUpdate depguard rule in .golangci.yml to enforce v1.40.0.
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrade the repository’s OpenTelemetry semantic conventions usage to go.opentelemetry.io/otel/semconv/v1.40.0, updating instrumentation, detectors, processors, propagators, examples, and shared semconv templates accordingly.
Changes:
- Update semconv imports across modules from
v1.39.0→v1.40.0(includinghttpconv,rpcconv,dbconv,goconv,processconv,systemconv). - Update
otelgrpcRPC instrumentation to reflect semconv v1.40.0 RPC changes (e.g., removal of message events and request/response size metrics). - Refresh Go module dependencies (
go.mod/go.sum) and depguard configuration, and document the change inCHANGELOG.md.
Reviewed changes
Copilot reviewed 139 out of 194 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| zpages/go.mod | Bumps OTel module dependencies. |
| zpages/go.sum | Updates module checksums after dependency bump. |
| samplers/probability/consistent/go.mod | Bumps OTel module dependencies. |
| samplers/probability/consistent/go.sum | Updates module checksums after dependency bump. |
| samplers/jaegerremote/go.mod | Bumps OTel module dependencies. |
| samplers/jaegerremote/go.sum | Updates module checksums after dependency bump. |
| samplers/jaegerremote/example/go.mod | Bumps OTel module dependencies for the example. |
| propagators/ot/go.mod | Bumps OTel module dependencies. |
| propagators/ot/go.sum | Updates module checksums after dependency bump. |
| propagators/opencensus/go.mod | Bumps OTel module dependencies (including opencensus bridge). |
| propagators/opencensus/examples/go.mod | Bumps OTel module dependencies for examples. |
| propagators/jaeger/go.mod | Bumps OTel module dependencies. |
| propagators/jaeger/go.sum | Updates module checksums after dependency bump. |
| propagators/b3/go.mod | Bumps OTel module dependencies. |
| propagators/b3/go.sum | Updates module checksums after dependency bump. |
| propagators/aws/go.mod | Bumps OTel module dependencies. |
| propagators/aws/go.sum | Updates module checksums after dependency bump. |
| propagators/autoprop/go.mod | Bumps OTel module dependencies. |
| propagators/autoprop/go.sum | Updates module checksums after dependency bump. |
| processors/minsev/go.mod | Bumps OTel log and related dependencies. |
| processors/baggagecopy/go.mod | Bumps OTel dependencies (trace/metric/log). |
| otelconf/v0.3.0/resource_test.go | Updates semconv import to v1.40.0 in tests. |
| otelconf/v0.2.0/resource_test.go | Removes semconv dependency by using schema URL from resource.Default() and literal service.name attribute. |
| otelconf/resource_test.go | Updates semconv import to v1.40.0 in tests. |
| otelconf/go.mod | Bumps OTel exporter/sdk/log/metric/trace dependencies. |
| internal/shared/semconv/util.go.tmpl | Updates template semconv import to v1.40.0. |
| internal/shared/semconv/server.go.tmpl | Updates template semconv/httpconv imports to v1.40.0. |
| internal/shared/semconv/httpconv.go.tmpl | Updates template semconv import to v1.40.0. |
| internal/shared/semconv/env.go.tmpl | Updates template httpconv import to v1.40.0. |
| internal/shared/semconv/client.go.tmpl | Updates template semconv/httpconv imports to v1.40.0. |
| instrumentation/runtime/runtime.go | Updates goconv import to semconv v1.40.0. |
| instrumentation/runtime/runtime_test.go | Updates goconv import to semconv v1.40.0. |
| instrumentation/runtime/go.mod | Bumps OTel module dependencies. |
| instrumentation/runtime/go.sum | Updates module checksums after dependency bump. |
| instrumentation/net/http/otelhttp/transport.go | Updates semconv import alias to v1.40.0. |
| instrumentation/net/http/otelhttp/transport_test.go | Updates semconv import to v1.40.0. |
| instrumentation/net/http/otelhttp/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/net/http/otelhttp/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/net/http/otelhttp/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/net/http/otelhttp/go.mod | Bumps OTel module dependencies. |
| instrumentation/net/http/otelhttp/go.sum | Updates module checksums after dependency bump. |
| instrumentation/net/http/otelhttp/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/net/http/otelhttp/example/server/server.go | Updates semconv import to v1.40.0 in example. |
| instrumentation/net/http/otelhttp/example/client/client.go | Updates semconv import to v1.40.0 in example. |
| instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/net/http/httptrace/otelhttptrace/go.mod | Bumps OTel module dependencies. |
| instrumentation/net/http/httptrace/otelhttptrace/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/net/http/httptrace/otelhttptrace/example/server/server.go | Updates semconv import to v1.40.0 in example. |
| instrumentation/net/http/httptrace/otelhttptrace/example/client/client.go | Updates semconv import to v1.40.0 in example. |
| instrumentation/host/host.go | Updates process/system semconv imports to v1.40.0. |
| instrumentation/host/host_test.go | Updates process/system semconv imports to v1.40.0. |
| instrumentation/host/go.mod | Bumps OTel module dependencies. |
| instrumentation/host/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/host/example/main.go | Updates semconv import to v1.40.0 in example. |
| instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go | Updates semconv/rpcconv to v1.40.0 and removes RPC message events and request/response size metrics instrumentation. |
| instrumentation/google.golang.org/grpc/otelgrpc/stats_handler_test.go | Updates tests to match removed metrics/events behavior. |
| instrumentation/google.golang.org/grpc/otelgrpc/stats_handlertest_test.go | Updates semconv/rpcconv imports to v1.40.0 in tests. |
| instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go | Updates semconv import to v1.40.0. |
| instrumentation/google.golang.org/grpc/otelgrpc/internal/parse_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go | Updates semconv import to v1.40.0. |
| instrumentation/google.golang.org/grpc/otelgrpc/grpc_test.go | Updates semconv import to v1.40.0 and removes event assertion helper tied to removed behavior. |
| instrumentation/google.golang.org/grpc/otelgrpc/go.mod | Bumps OTel module dependencies. |
| instrumentation/google.golang.org/grpc/otelgrpc/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/mongo.go | Updates semconv/dbconv imports to v1.40.0. |
| instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/go.mod | Bumps OTel module dependencies. |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/internal/semconv/event_monitor.go | Updates semconv import to v1.40.0 (keeps older semconv v1.21.0 alongside). |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/internal/semconv/event_monitor_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.mod | Bumps OTel module dependencies. |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.sum | Updates module checksums after dependency bump. |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.mod | Bumps OTel module dependencies for tests. |
| instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.sum | Updates module checksums after dependency bump. |
| instrumentation/github.com/labstack/echo/otelecho/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/github.com/labstack/echo/otelecho/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/labstack/echo/otelecho/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/labstack/echo/otelecho/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/labstack/echo/otelecho/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/github.com/gorilla/mux/otelmux/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/github.com/gorilla/mux/otelmux/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/gorilla/mux/otelmux/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/gorilla/mux/otelmux/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/gin-gonic/gin/otelgin/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/gin-gonic/gin/otelgin/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconv/util.go | Updates internal semconv import to v1.40.0. |
| instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconv/server.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/emicklei/go-restful/otelrestful/internal/semconv/client.go | Updates internal semconv/httpconv imports to v1.40.0. |
| instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum | Updates module checksums after dependency bump. |
| instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/lambda.go | Updates semconv import to v1.40.0. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/lambdatest_test.go | Updates semconv import to v1.40.0 in tests. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/go.mod | Bumps OTel module dependencies. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/go.sum | Updates module checksums after dependency bump. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod | Bumps OTel module dependencies for the example. |
| instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/go.mod | Bumps OTel module dependencies for xrayconfig. |
| exporters/autoexport/go.mod | Bumps OTel exporter/sdk dependencies. |
| examples/prometheus/go.mod | Bumps OTel metric/prometheus exporter dependencies. |
| examples/passthrough/go.mod | Bumps OTel trace SDK/exporter dependencies. |
| examples/otel-collector/main.go | Updates semconv import to v1.40.0. |
| examples/otel-collector/go.mod | Bumps OTel OTLP exporter/sdk dependencies. |
| examples/opencensus/go.mod | Bumps OTel opencensus bridge/sdk/exporter dependencies. |
| examples/namedtracer/go.mod | Bumps OTel SDK/exporter dependencies. |
| examples/dice/instrumented/go.mod | Bumps OTel log/metric/trace SDK/exporter dependencies. |
| detectors/gcp/detector.go | Updates semconv import to v1.40.0. |
| detectors/gcp/detector_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/gcp/gce.go | Updates semconv import to v1.40.0. |
| detectors/gcp/gke.go | Updates semconv import to v1.40.0. |
| detectors/gcp/cloud-run.go | Updates semconv import to v1.40.0. |
| detectors/gcp/cloud-function.go | Updates semconv import to v1.40.0. |
| detectors/gcp/cloud-function_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/gcp/go.mod | Bumps OTel module dependencies. |
| detectors/gcp/go.sum | Updates module checksums after dependency bump. |
| detectors/azure/azurevm/vm.go | Updates semconv import to v1.40.0. |
| detectors/azure/azurevm/vm_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/azure/azurevm/go.mod | Bumps OTel module dependencies. |
| detectors/azure/azurevm/go.sum | Updates module checksums after dependency bump. |
| detectors/aws/lambda/detector.go | Updates semconv import to v1.40.0. |
| detectors/aws/lambda/detector_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/aws/lambda/go.mod | Bumps OTel module dependencies. |
| detectors/aws/lambda/go.sum | Updates module checksums after dependency bump. |
| detectors/aws/eks/detector.go | Updates semconv import to v1.40.0. |
| detectors/aws/eks/detector_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/aws/eks/go.mod | Bumps OTel module dependencies. |
| detectors/aws/eks/go.sum | Updates module checksums after dependency bump. |
| detectors/aws/ecs/ecs.go | Updates semconv import to v1.40.0. |
| detectors/aws/ecs/ecs_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/aws/ecs/test/ecs_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/aws/ecs/go.mod | Bumps OTel module dependencies. |
| detectors/aws/ecs/go.sum | Updates module checksums after dependency bump. |
| detectors/aws/ec2/v2/ec2.go | Updates semconv import to v1.40.0. |
| detectors/aws/ec2/v2/ec2_test.go | Updates semconv import to v1.40.0 in tests. |
| detectors/aws/ec2/v2/go.mod | Bumps OTel module dependencies. |
| detectors/aws/ec2/v2/go.sum | Updates module checksums after dependency bump. |
| detectors/autodetect/go.mod | Bumps OTel module dependencies. |
| detectors/autodetect/go.sum | Updates module checksums after dependency bump. |
| bridges/prometheus/go.mod | Bumps OTel SDK/metric dependencies. |
| bridges/prometheus/go.sum | Updates module checksums after dependency bump. |
| bridges/otelzap/go.mod | Bumps OTel log dependencies. |
| bridges/otelzap/go.sum | Updates module checksums after dependency bump. |
| bridges/otelzap/core.go | Updates semconv import to v1.40.0. |
| bridges/otelzap/core_test.go | Updates semconv import to v1.40.0 in tests. |
| bridges/otelslog/go.mod | Bumps OTel log dependencies. |
| bridges/otelslog/go.sum | Updates module checksums after dependency bump. |
| bridges/otelslog/handler.go | Updates semconv import to v1.40.0. |
| bridges/otelslog/handler_test.go | Updates semconv import to v1.40.0 in tests. |
| bridges/otellogrus/go.mod | Bumps OTel log dependencies. |
| bridges/otellogr/go.mod | Bumps OTel log dependencies. |
| bridges/otellogr/logsink.go | Updates semconv import to v1.40.0. |
| CHANGELOG.md | Documents the semconv v1.40.0 upgrade and notes RPC breaking changes. |
| .golangci.yml | Updates depguard rule to prefer semconv v1.40.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8631 +/- ##
=======================================
- Coverage 82.1% 82.1% -0.1%
=======================================
Files 180 180
Lines 13765 13722 -43
=======================================
- Hits 11313 11272 -41
+ Misses 2049 2048 -1
+ Partials 403 402 -1
🚀 New features to boost your workflow:
|
pellared
approved these changes
Mar 4, 2026
Member
pellared
left a comment
There was a problem hiding this comment.
Just 2 nit comments. Nice work!
MikeGoldsmith
approved these changes
Mar 4, 2026
dmathieu
approved these changes
Mar 4, 2026
dashpole
approved these changes
Mar 4, 2026
pellared
added a commit
that referenced
this pull request
Mar 6, 2026
#8649) ### Added - Add environment variables propagation carrier in `go.opentelemetry.io/contrib/propagators/envcar`. (#8442) ### Changed - Upgrade `go.opentelemetry.io/otel/semconv` to `v1.40.0`, including updates across instrumentation and detector modules. (#8631) - The semantic conventions v1.40.0 release introduces RPC breaking changes applied in this repository: - RPC spans and metrics no longer include `network.protocol.name`, `network.protocol.version`, or `network.transport` attributes. - `rpc.client.request.size`, `rpc.client.response.size`, `rpc.server.request.size`, and `rpc.server.response.size` are no longer emitted in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. - `rpc.message` span events and their message attributes are no longer emitted in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` (including when `WithMessageEvents` is configured). See [semantic-conventions v1.40.0 release](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.40.0) for complete details. ### Fixed - Ignore informational response status codes (`100-199`) except `101 Switching Protocols` when storing the HTTP status code in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` and `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux`. (#6913) - Make `Body` handling in `Transport` consistent with stdlib in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#8618) - Fix bucket boundaries for `rpc.server.call.duration` and `rpc.client.call.duration` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#8642) - Host resource detector in `go.opentelemetry.io/contrib/otelconf` now includes `os.` attributes. (#8578) ### Removed - Drop support for [Go 1.24]. (#8628) [Go 1.24]: https://go.dev/doc/go1.24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade active semantic-convention usage to
go.opentelemetry.io/otel/semconv/v1.40.0.