@@ -21,7 +21,7 @@ import (
21
21
22
22
"go.opentelemetry.io/otel/attribute"
23
23
"go.opentelemetry.io/otel/codes"
24
- "go.opentelemetry.io/otel/semconv/internal/v3 "
24
+ "go.opentelemetry.io/otel/semconv/internal/v4 "
25
25
semconv "go.opentelemetry.io/otel/semconv/{{.TagVer}}"
26
26
)
27
27
44
44
45
45
EnduserIDKey: semconv.EnduserIDKey,
46
46
HTTPClientIPKey: semconv.HTTPClientIPKey,
47
- HTTPFlavorKey: semconv.HTTPFlavorKey,
47
+ NetProtocolNameKey: semconv.NetProtocolNameKey,
48
+ NetProtocolVersionKey: semconv.NetProtocolVersionKey,
48
49
HTTPMethodKey: semconv.HTTPMethodKey,
49
50
HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey,
50
51
HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey,
@@ -74,10 +75,11 @@ func ClientResponse(resp *http.Response) []attribute.KeyValue {
74
75
}
75
76
76
77
// ClientRequest returns trace attributes for an HTTP request made by a client.
77
- // The following attributes are always returned: "http.url", "http.flavor",
78
- // "http.method", "net.peer.name". The following attributes are returned if the
79
- // related values are defined in req: "net.peer.port", "http.user_agent",
80
- // "http.request_content_length", "enduser.id".
78
+ // The following attributes are always returned: "http.url",
79
+ // "net.protocol.(name|version)", "http.method", "net.peer.name".
80
+ // The following attributes are returned if the related values are defined
81
+ // in req: "net.peer.port", "http.user_agent", "http.request_content_length",
82
+ // "enduser.id".
81
83
func ClientRequest(req *http.Request) []attribute.KeyValue {
82
84
return hc.ClientRequest(req)
83
85
}
@@ -106,10 +108,10 @@ func ClientStatus(code int) (codes.Code, string) {
106
108
// The req Host will be used to determine the server instead.
107
109
//
108
110
// The following attributes are always returned: "http.method", "http.scheme",
109
- // "http.flavor ", "http.target", "net.host.name". The following attributes are
110
- // returned if they related values are defined in req: "net.host.port",
111
- // "net.sock.peer.addr ", "net.sock.peer.port ", "user_agent.original", "enduser.id ",
112
- // "http.client_ip".
111
+ // ""net.protocol.(name|version) ", "http.target", "net.host.name".
112
+ // The following attributes are returned if they related values are defined
113
+ // in req: "net.host.port ", "net.sock.peer.addr ", "net.sock.peer.port ",
114
+ // "user_agent.original", "enduser.id", " http.client_ip".
113
115
func ServerRequest(server string, req *http.Request) []attribute.KeyValue {
114
116
return hc.ServerRequest(server, req)
115
117
}
0 commit comments