build(deps): bump the otel group across 1 directory with 2 updates

Bumps the otel group with 2 updates in the / directory: [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) and [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib).


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.67.0 to 0.68.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.67.0...zpages/v0.68.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.67.0 to 0.68.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.67.0...zpages/v0.68.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-version: 0.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-version: 0.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] authored and GitHub committed 2026-04-28 02:02:44 +00:00
1 parent d8e7c719ae
commit 1696b0458f
10 files changed
+1208 -46

No files matched your search

+3 -3
View File
@@ -67,8 +67,8 @@ require (
github.com/vishvananda/netlink v1.3.1
github.com/vishvananda/netns v0.0.5
go.etcd.io/bbolt v1.4.3
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0
@@ -79,7 +79,7 @@ require (
golang.org/x/sync v0.20.0
golang.org/x/sys v0.43.0
golang.org/x/time v0.15.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d
google.golang.org/grpc v1.80.0
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
k8s.io/apimachinery v0.36.0
+6 -6
View File
@@ -363,10 +363,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k=
@@ -530,8 +530,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA=
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 h1:m8qni9SQFH0tJc1X0vmnpw/0t+AImlSvp30sEupozUg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@@ -5,6 +5,8 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g
import (
"context"
"os"
"strings"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
@@ -29,6 +31,14 @@ type InterceptorFilter func(*InterceptorInfo) bool
// A Filter must return true if the request should be instrumented.
type Filter func(*stats.RPCTagInfo) bool
type semconvMode int
const (
semconvModeNew semconvMode = iota // Default
semconvModeOld
semconvModeDup
)
// config is a group of options for this instrumentation.
type config struct {
Filter Filter
@@ -47,6 +57,8 @@ type config struct {
ReceivedEvent bool
SentEvent bool
semconvMode semconvMode
}
// Option applies an option value for a config.
@@ -66,13 +78,33 @@ func newConfig(opts []Option) *config {
Propagators: otel.GetTextMapPropagator(),
TracerProvider: otel.GetTracerProvider(),
MeterProvider: otel.GetMeterProvider(),
semconvMode: parseSemconvMode(),
}
for _, o := range opts {
o.apply(c)
}
return c
}
func parseSemconvMode() semconvMode {
val := os.Getenv("OTEL_SEMCONV_STABILITY_OPT_IN")
if val == "" {
return semconvModeNew
}
parts := strings.SplitSeq(val, ",")
for p := range parts {
p = strings.TrimSpace(p)
if p == "rpc/dup" {
return semconvModeDup
}
if p == "rpc/old" {
return semconvModeOld
}
}
return semconvModeNew
}
// WithPublicEndpoint configures the Handler to link the span with an incoming
// span context. If this option is not provided, then the association is a child
// association instead of a link.
@@ -8,6 +8,7 @@ import (
"strings"
"go.opentelemetry.io/otel/attribute"
oldsemconv "go.opentelemetry.io/otel/semconv/v1.37.0" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
)
@@ -25,3 +26,28 @@ func ParseFullMethod(fullMethod string) (string, []attribute.KeyValue) {
name := fullMethod[1:]
return name, []attribute.KeyValue{semconv.RPCMethod(name)}
}
// ParseFullMethodOld returns a span name following the old OpenTelemetry semantic
// conventions as well as all applicable span attribute.KeyValue attributes based
// on a gRPC's FullMethod.
// Based on the implementation in:
// https://github.com/open-telemetry/opentelemetry-go-contrib/blob/072dcf8ad7e5e48b506e05720b29d8b078759606/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go#L20
func ParseFullMethodOld(fullMethod string) (string, []attribute.KeyValue) {
if !strings.HasPrefix(fullMethod, "/") {
return fullMethod, nil
}
name := fullMethod[1:]
parts := strings.Split(name, "/")
if len(parts) < 2 {
return name, []attribute.KeyValue{
attribute.String("rpc.system", "grpc"),
}
}
service := parts[0]
method := parts[1]
return name, []attribute.KeyValue{
oldsemconv.RPCSystemKey.String("grpc"),
oldsemconv.RPCServiceKey.String(service),
oldsemconv.RPCMethodKey.String(method),
}
}
@@ -12,11 +12,12 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
oldrpcconv "go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
"go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv"
"go.opentelemetry.io/otel/trace"
grpc_codes "google.golang.org/grpc/codes"
"google.golang.org/grpc/peer"
"google.golang.org/grpc/stats"
"google.golang.org/grpc/status"
@@ -35,7 +36,8 @@ type serverHandler struct {
tracer trace.Tracer
duration rpcconv.ServerCallDuration
duration rpcconv.ServerCallDuration
oldDuration oldrpcconv.ServerDuration
}
// NewServerHandler creates a stats.Handler for a gRPC server.
@@ -59,15 +61,26 @@ func NewServerHandler(opts ...Option) stats.Handler {
)
var err error
h.duration, err = rpcconv.NewServerCallDuration(
meter,
metric.WithExplicitBucketBoundaries(
0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
),
)
if err != nil {
otel.Handle(err)
if c.semconvMode == semconvModeOld || c.semconvMode == semconvModeDup {
oldDur, err := oldrpcconv.NewServerDuration(meter)
if err != nil {
otel.Handle(err)
} else {
h.oldDuration = oldDur
}
}
if c.semconvMode == semconvModeNew || c.semconvMode == semconvModeDup {
h.duration, err = rpcconv.NewServerCallDuration(
meter,
metric.WithExplicitBucketBoundaries(
0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
),
)
if err != nil {
otel.Handle(err)
}
}
return h
@@ -86,8 +99,23 @@ func (*serverHandler) HandleConn(context.Context, stats.ConnStats) {
func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
ctx = extract(ctx, h.Propagators)
name, attrs := internal.ParseFullMethod(info.FullMethodName)
attrs = append(attrs, semconv.RPCSystemNameGRPC)
var name string
var attrs []attribute.KeyValue
switch h.semconvMode {
case semconvModeOld:
name, attrs = internal.ParseFullMethodOld(info.FullMethodName)
case semconvModeDup:
var attrsNew, attrsOld []attribute.KeyValue
name, attrsNew = internal.ParseFullMethod(info.FullMethodName)
_, attrsOld = internal.ParseFullMethodOld(info.FullMethodName)
// Combine both. We append New last so its rpc.method (fully qualified) wins when deduplicated.
attrs = append(append([]attribute.KeyValue{}, attrsOld...), attrsNew...)
attrs = append(attrs, semconv.RPCSystemNameGRPC) // New convention
default: // semconvModeNew
name, attrs = internal.ParseFullMethod(info.FullMethodName)
attrs = append(attrs, semconv.RPCSystemNameGRPC)
}
record := true
if h.Filter != nil {
@@ -131,10 +159,19 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
// HandleRPC processes the RPC stats.
func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
var dur metric.Float64Histogram
if h.semconvMode == semconvModeNew || h.semconvMode == semconvModeDup {
dur = h.duration.Inst()
}
var oldDur metric.Float64Histogram
if h.semconvMode == semconvModeOld || h.semconvMode == semconvModeDup {
oldDur = h.oldDuration.Inst()
}
h.handleRPC(
ctx,
rs,
h.duration.Inst(),
dur,
oldDur,
serverStatus,
)
}
@@ -144,7 +181,8 @@ type clientHandler struct {
tracer trace.Tracer
duration rpcconv.ClientCallDuration
duration rpcconv.ClientCallDuration
oldDuration oldrpcconv.ClientDuration
}
// NewClientHandler creates a stats.Handler for a gRPC client.
@@ -168,15 +206,26 @@ func NewClientHandler(opts ...Option) stats.Handler {
)
var err error
h.duration, err = rpcconv.NewClientCallDuration(
meter,
metric.WithExplicitBucketBoundaries(
0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
),
)
if err != nil {
otel.Handle(err)
if c.semconvMode == semconvModeOld || c.semconvMode == semconvModeDup {
oldDur, err := oldrpcconv.NewClientDuration(meter)
if err != nil {
otel.Handle(err)
} else {
h.oldDuration = oldDur
}
}
if c.semconvMode == semconvModeNew || c.semconvMode == semconvModeDup {
h.duration, err = rpcconv.NewClientCallDuration(
meter,
metric.WithExplicitBucketBoundaries(
0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
),
)
if err != nil {
otel.Handle(err)
}
}
return h
@@ -184,8 +233,23 @@ func NewClientHandler(opts ...Option) stats.Handler {
// TagRPC can attach some information to the given context.
func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
name, attrs := internal.ParseFullMethod(info.FullMethodName)
attrs = append(attrs, semconv.RPCSystemNameGRPC)
var name string
var attrs []attribute.KeyValue
switch h.semconvMode {
case semconvModeOld:
name, attrs = internal.ParseFullMethodOld(info.FullMethodName)
case semconvModeDup:
var attrsNew, attrsOld []attribute.KeyValue
name, attrsNew = internal.ParseFullMethod(info.FullMethodName)
_, attrsOld = internal.ParseFullMethodOld(info.FullMethodName)
// Combine both. We append New last so its rpc.method (fully qualified) wins when deduplicated.
attrs = append(append([]attribute.KeyValue{}, attrsOld...), attrsNew...)
attrs = append(attrs, semconv.RPCSystemNameGRPC) // New convention
default: // semconvModeNew
name, attrs = internal.ParseFullMethod(info.FullMethodName)
attrs = append(attrs, semconv.RPCSystemNameGRPC)
}
record := true
if h.Filter != nil {
@@ -219,10 +283,19 @@ func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
// HandleRPC processes the RPC stats.
func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
var dur metric.Float64Histogram
if h.semconvMode == semconvModeNew || h.semconvMode == semconvModeDup {
dur = h.duration.Inst()
}
var oldDur metric.Float64Histogram
if h.semconvMode == semconvModeOld || h.semconvMode == semconvModeDup {
oldDur = h.oldDuration.Inst()
}
h.handleRPC(
ctx,
rs,
h.duration.Inst(),
dur,
oldDur,
func(s *status.Status) (codes.Code, string) {
return codes.Error, s.Message()
},
@@ -243,6 +316,7 @@ func (*config) handleRPC(
ctx context.Context,
rs stats.RPCStats,
duration metric.Float64Histogram,
oldDuration metric.Float64Histogram,
recordStatus func(*status.Status) (codes.Code, string),
) {
gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext)
@@ -255,12 +329,23 @@ func (*config) handleRPC(
switch rs := rs.(type) {
case *stats.Begin:
case *stats.InPayload:
case *stats.InHeader:
if !rs.Client && rs.LocalAddr != nil {
if span.IsRecording() {
span.SetAttributes(serverAddrAttrs(rs.LocalAddr.String())...)
}
// TODO: add server.address and server.port to metrics once the API supports opt-in attributes.
}
case *stats.OutPayload:
case *stats.OutTrailer:
case *stats.OutHeader:
if span.IsRecording() {
if p, ok := peer.FromContext(ctx); ok {
span.SetAttributes(serverAddrAttrs(p.Addr.String())...)
if rs.Client && rs.RemoteAddr != nil && (span.IsRecording() || gctx != nil) {
attrs := serverAddrAttrs(rs.RemoteAddr.String())
if span.IsRecording() {
span.SetAttributes(attrs...)
}
if gctx != nil {
gctx.metricAttrs = append(gctx.metricAttrs, attrs...)
}
}
case *stats.End:
@@ -298,7 +383,13 @@ func (*config) handleRPC(
// Measure right before calling Record() to capture as much elapsed time as possible.
elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Second)
duration.Record(ctx, elapsedTime, recordOpts...)
if duration != nil {
duration.Record(ctx, elapsedTime, recordOpts...)
}
if oldDuration != nil {
oldDuration.Record(ctx, elapsedTime*1000.0, recordOpts...)
}
default:
return
}
@@ -4,4 +4,4 @@
package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
// Version is the current release version of the gRPC instrumentation.
const Version = "0.67.0"
const Version = "0.68.0"
@@ -364,7 +364,9 @@ func (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCod
if statusCode > 0 {
num++
}
if route == "" && req.Pattern != "" {
route = httpRoute(req.Pattern)
}
if route != "" {
num++
}
@@ -4,4 +4,4 @@
package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
// Version is the current release version of the otelhttp instrumentation.
const Version = "0.67.0"
const Version = "0.68.0"
File diff suppressed because it is too large. Load diff
+4 -3
View File
@@ -595,11 +595,11 @@ go.opencensus.io/trace/tracestate
## explicit; go 1.24.0
go.opentelemetry.io/auto/sdk
go.opentelemetry.io/auto/sdk/internal/telemetry
# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0
# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request
@@ -618,6 +618,7 @@ go.opentelemetry.io/otel/internal/global
go.opentelemetry.io/otel/propagation
go.opentelemetry.io/otel/semconv/v1.17.0
go.opentelemetry.io/otel/semconv/v1.37.0
go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv
go.opentelemetry.io/otel/semconv/v1.40.0
go.opentelemetry.io/otel/semconv/v1.40.0/httpconv
go.opentelemetry.io/otel/semconv/v1.40.0/otelconv
@@ -740,7 +741,7 @@ golang.org/x/time/rate
# google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9
## explicit; go 1.25.0
google.golang.org/genproto/googleapis/api/httpbody
# google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9
# google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d
## explicit; go 1.25.0
google.golang.org/genproto/googleapis/rpc/code
google.golang.org/genproto/googleapis/rpc/errdetails