mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-02 21:48:07 -06:00
[chore] update otel -> v1.20.0 (#2358)
This commit is contained in:
parent
deaea100c3
commit
7753f42132
422 changed files with 1814 additions and 6590 deletions
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package internal // import "go.opentelemetry.io/otel/semconv/internal/v2"
|
||||
package internal // import "go.opentelemetry.io/otel/semconv/internal/v4"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -30,7 +30,8 @@ type HTTPConv struct {
|
|||
|
||||
EnduserIDKey attribute.Key
|
||||
HTTPClientIPKey attribute.Key
|
||||
HTTPFlavorKey attribute.Key
|
||||
NetProtocolNameKey attribute.Key
|
||||
NetProtocolVersionKey attribute.Key
|
||||
HTTPMethodKey attribute.Key
|
||||
HTTPRequestContentLengthKey attribute.Key
|
||||
HTTPResponseContentLengthKey attribute.Key
|
||||
|
|
@ -40,7 +41,7 @@ type HTTPConv struct {
|
|||
HTTPStatusCodeKey attribute.Key
|
||||
HTTPTargetKey attribute.Key
|
||||
HTTPURLKey attribute.Key
|
||||
HTTPUserAgentKey attribute.Key
|
||||
UserAgentOriginalKey attribute.Key
|
||||
}
|
||||
|
||||
// ClientResponse returns attributes for an HTTP response received by a client
|
||||
|
|
@ -121,7 +122,7 @@ func (c *HTTPConv) ClientRequest(req *http.Request) []attribute.KeyValue {
|
|||
}
|
||||
|
||||
if useragent != "" {
|
||||
attrs = append(attrs, c.HTTPUserAgentKey.String(useragent))
|
||||
attrs = append(attrs, c.UserAgentOriginalKey.String(useragent))
|
||||
}
|
||||
|
||||
if l := req.ContentLength; l > 0 {
|
||||
|
|
@ -220,7 +221,7 @@ func (c *HTTPConv) ServerRequest(server string, req *http.Request) []attribute.K
|
|||
}
|
||||
|
||||
if useragent != "" {
|
||||
attrs = append(attrs, c.HTTPUserAgentKey.String(useragent))
|
||||
attrs = append(attrs, c.UserAgentOriginalKey.String(useragent))
|
||||
}
|
||||
|
||||
if hasUserID {
|
||||
|
|
@ -251,15 +252,15 @@ func (c *HTTPConv) scheme(https bool) attribute.KeyValue { // nolint:revive
|
|||
func (c *HTTPConv) proto(proto string) attribute.KeyValue {
|
||||
switch proto {
|
||||
case "HTTP/1.0":
|
||||
return c.HTTPFlavorKey.String("1.0")
|
||||
return c.NetProtocolVersionKey.String("1.0")
|
||||
case "HTTP/1.1":
|
||||
return c.HTTPFlavorKey.String("1.1")
|
||||
return c.NetProtocolVersionKey.String("1.1")
|
||||
case "HTTP/2":
|
||||
return c.HTTPFlavorKey.String("2.0")
|
||||
return c.NetProtocolVersionKey.String("2.0")
|
||||
case "HTTP/3":
|
||||
return c.HTTPFlavorKey.String("3.0")
|
||||
return c.NetProtocolVersionKey.String("3.0")
|
||||
default:
|
||||
return c.HTTPFlavorKey.String(proto)
|
||||
return c.NetProtocolNameKey.String(proto)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package internal // import "go.opentelemetry.io/otel/semconv/internal/v2"
|
||||
package internal // import "go.opentelemetry.io/otel/semconv/internal/v4"
|
||||
|
||||
import (
|
||||
"net"
|
||||
Loading…
Add table
Add a link
Reference in a new issue