Skip to content

Upgrade to semconv/v1.40.0#8631

Merged
MrAlias merged 10 commits into
open-telemetry:mainfrom
MrAlias:up-semconv-v1.40.0
Mar 5, 2026
Merged

Upgrade to semconv/v1.40.0#8631
MrAlias merged 10 commits into
open-telemetry:mainfrom
MrAlias:up-semconv-v1.40.0

Conversation

@MrAlias
Copy link
Copy Markdown
Contributor

@MrAlias MrAlias commented Mar 3, 2026

Upgrade active semantic-convention usage to go.opentelemetry.io/otel/semconv/v1.40.0.

MrAlias added 2 commits March 3, 2026 14:27
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.
@MrAlias MrAlias added this to the v1.41.0 milestone Mar 3, 2026
@MrAlias MrAlias marked this pull request as ready for review March 4, 2026 01:25
Copilot AI review requested due to automatic review settings March 4, 2026 01:25
@MrAlias MrAlias requested review from a team, dashpole, dmathieu, flc1125 and pellared as code owners March 4, 2026 01:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0v1.40.0 (including httpconv, rpcconv, dbconv, goconv, processconv, systemconv).
  • Update otelgrpc RPC 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 in CHANGELOG.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.

Comment thread instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go Outdated
Comment thread otelconf/go.mod
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.1%. Comparing base (db30b79) to head (be93c8a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           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     
Files with missing lines Coverage Δ
bridges/otellogr/logsink.go 100.0% <ø> (ø)
bridges/otelslog/handler.go 96.8% <ø> (ø)
bridges/otelzap/core.go 97.6% <ø> (ø)
detectors/aws/ec2/v2/ec2.go 80.3% <ø> (ø)
detectors/aws/ecs/ecs.go 68.7% <ø> (ø)
detectors/aws/eks/detector.go 40.9% <ø> (ø)
detectors/aws/lambda/detector.go 90.0% <ø> (ø)
detectors/azure/azurevm/vm.go 91.3% <ø> (ø)
detectors/gcp/cloud-function.go 100.0% <ø> (ø)
detectors/gcp/cloud-run.go 100.0% <ø> (ø)
... and 40 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 2 nit comments. Nice work!

Comment thread instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go Outdated
Comment thread instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go Outdated
@pellared pellared modified the milestones: v1.41.0, v1.42.0 Mar 4, 2026
@MrAlias MrAlias merged commit 6c6e318 into open-telemetry:main Mar 5, 2026
30 checks passed
@MrAlias MrAlias deleted the up-semconv-v1.40.0 branch March 5, 2026 01:20
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants