Revert "update OpenTelemetry dependencies"

This reverts commit 82e9ce79c7.
This commit is contained in:
David Ashpole
2024-06-26 14:13:33 +00:00
parent 4b2fafc75e
commit e94047c900
491 changed files with 13452 additions and 23903 deletions

View File

@@ -11,21 +11,18 @@ import (
// HasExtension reports whether an extension field is populated.
// It returns false if m is invalid or if xt does not extend m.
func HasExtension(m Message, xt protoreflect.ExtensionType) bool {
// Treat nil message interface or descriptor as an empty message; no populated
// fields.
if m == nil || xt == nil {
// Treat nil message interface as an empty message; no populated fields.
if m == nil {
return false
}
// As a special-case, we reports invalid or mismatching descriptors
// as always not being populated (since they aren't).
mr := m.ProtoReflect()
xd := xt.TypeDescriptor()
if mr.Descriptor() != xd.ContainingMessage() {
if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() {
return false
}
return mr.Has(xd)
return m.ProtoReflect().Has(xt.TypeDescriptor())
}
// ClearExtension clears an extension field such that subsequent