feat: load model from oci image
This commit is contained in:
13
vendor/go.opentelemetry.io/otel/semconv/internal/http.go
generated
vendored
13
vendor/go.opentelemetry.io/otel/semconv/internal/http.go
generated
vendored
@@ -147,12 +147,6 @@ func (sc *SemanticConventions) EndUserAttributesFromHTTPRequest(request *http.Re
|
||||
func (sc *SemanticConventions) HTTPClientAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue {
|
||||
attrs := []attribute.KeyValue{}
|
||||
|
||||
if request.Method != "" {
|
||||
attrs = append(attrs, sc.HTTPMethodKey.String(request.Method))
|
||||
} else {
|
||||
attrs = append(attrs, sc.HTTPMethodKey.String(http.MethodGet))
|
||||
}
|
||||
|
||||
// remove any username/password info that may be in the URL
|
||||
// before adding it to the attributes
|
||||
userinfo := request.URL.User
|
||||
@@ -204,6 +198,12 @@ func (sc *SemanticConventions) httpBasicAttributesFromHTTPRequest(request *http.
|
||||
attrs = append(attrs, sc.HTTPFlavorKey.String(flavor))
|
||||
}
|
||||
|
||||
if request.Method != "" {
|
||||
attrs = append(attrs, sc.HTTPMethodKey.String(request.Method))
|
||||
} else {
|
||||
attrs = append(attrs, sc.HTTPMethodKey.String(http.MethodGet))
|
||||
}
|
||||
|
||||
return attrs
|
||||
}
|
||||
|
||||
@@ -223,7 +223,6 @@ func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(serverN
|
||||
// supported.
|
||||
func (sc *SemanticConventions) HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue {
|
||||
attrs := []attribute.KeyValue{
|
||||
sc.HTTPMethodKey.String(request.Method),
|
||||
sc.HTTPTargetKey.String(request.RequestURI),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user