@@ -79,68 +79,68 @@ public struct HTTPAttributes: SpanAttributeNamespace {
79
79
public init ( ) { }
80
80
81
81
/// HTTP request method. E.g. "GET".
82
- public var method : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. method) }
82
+ public var method : Key < String > { . init( name: SpanAttributeName . HTTP. method) }
83
83
84
84
/// Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment].
85
85
/// Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.
86
- public var url : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. url) }
86
+ public var url : Key < String > { . init( name: SpanAttributeName . HTTP. url) }
87
87
88
88
/// The full request target as passed in a HTTP request line or equivalent, e.g. "/path/12314/?q=ddds#123".
89
- public var target : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. target) }
89
+ public var target : Key < String > { . init( name: SpanAttributeName . HTTP. target) }
90
90
91
91
/// The value of the HTTP host header. When the header is empty or not present, this attribute should be the same.
92
- public var host : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. host) }
92
+ public var host : Key < String > { . init( name: SpanAttributeName . HTTP. host) }
93
93
94
94
/// The URI scheme identifying the used protocol: "http" or "https"
95
- public var scheme : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. scheme) }
95
+ public var scheme : Key < String > { . init( name: SpanAttributeName . HTTP. scheme) }
96
96
97
97
/// HTTP response status code. E.g. 200.
98
- public var statusCode : SpanAttribute . Key < Int > { . init( name: SpanAttributeName . HTTP. statusCode) }
98
+ public var statusCode : Key < Int > { . init( name: SpanAttributeName . HTTP. statusCode) }
99
99
100
100
/// HTTP reason phrase. E.g. "OK".
101
- public var statusText : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. statusText) }
101
+ public var statusText : Key < String > { . init( name: SpanAttributeName . HTTP. statusText) }
102
102
103
103
/// Kind of HTTP protocol used: "1.0", "1.1", "2", "SPDY" or "QUIC".
104
- public var flavor : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. flavor) }
104
+ public var flavor : Key < String > { . init( name: SpanAttributeName . HTTP. flavor) }
105
105
106
106
/// Value of the HTTP User-Agent header sent by the client.
107
- public var userAgent : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. userAgent) }
107
+ public var userAgent : Key < String > { . init( name: SpanAttributeName . HTTP. userAgent) }
108
108
109
109
/// The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often,
110
110
/// but not always, present as the Content-Length header. For requests using transport encoding, this should be the
111
111
/// compressed size.
112
- public var requestContentLength : SpanAttribute . Key < Int > {
112
+ public var requestContentLength : Key < Int > {
113
113
. init( name: SpanAttributeName . HTTP. requestContentLength)
114
114
}
115
115
116
116
/// The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.
117
- public var requestContentLengthUncompressed : SpanAttribute . Key < Int > {
117
+ public var requestContentLengthUncompressed : Key < Int > {
118
118
. init( name: SpanAttributeName . HTTP. requestContentLengthUncompressed)
119
119
}
120
120
121
121
/// The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and
122
122
/// is often, but not always, present as the Content-Length header. For requests using transport encoding, this
123
123
/// should be the compressed size.
124
- public var responseContentLength : SpanAttribute . Key < Int > {
124
+ public var responseContentLength : Key < Int > {
125
125
. init( name: SpanAttributeName . HTTP. responseContentLength)
126
126
}
127
127
128
128
/// The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.
129
- public var responseContentLengthUncompressed : SpanAttribute . Key < Int > {
129
+ public var responseContentLengthUncompressed : Key < Int > {
130
130
. init( name: SpanAttributeName . HTTP. responseContentLengthUncompressed)
131
131
}
132
132
133
133
/// The primary server name of the matched virtual host. This should be obtained via configuration.
134
134
/// If no such configuration can be obtained, this attribute MUST NOT be set (`net.hostName` should be used instead).
135
- public var serverName : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. serverName) }
135
+ public var serverName : Key < String > { . init( name: SpanAttributeName . HTTP. serverName) }
136
136
137
137
/// The matched route (path template). E.g. "/users/:userID?".
138
- public var serverRoute : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. serverRoute) }
138
+ public var serverRoute : Key < String > { . init( name: SpanAttributeName . HTTP. serverRoute) }
139
139
140
140
/// The IP address of the original client behind all proxies, if known (e.g. from X-Forwarded-For).
141
141
/// Note that this is not necessarily the same as `net.peerIP`, which would identify the network-level peer,
142
142
/// which may be a proxy.
143
- public var serverClientIP : SpanAttribute . Key < String > { . init( name: SpanAttributeName . HTTP. serverClientIP) }
143
+ public var serverClientIP : Key < String > { . init( name: SpanAttributeName . HTTP. serverClientIP) }
144
144
}
145
145
}
146
146
#endif
0 commit comments