You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/http/http-metrics.md
+24-12
Original file line number
Diff line number
Diff line change
@@ -126,10 +126,14 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
126
126
**[5]:**`network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
127
127
128
128
**[6]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
129
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
129
+
> **Warning**
130
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
131
+
> to trigger cardinality limits, degrading the usefulness of the metric.
130
132
131
133
**[7]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
132
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
134
+
> **Warning**
135
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
136
+
> to trigger cardinality limits, degrading the usefulness of the metric.
133
137
134
138
**[8]:** The scheme of the original client request, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded), [X-Forwarded-Proto](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Proto), or a similar header). Otherwise, the scheme of the immediate peer request.
135
139
@@ -191,14 +195,14 @@ Instrumentations for specific web frameworks that consider HTTP methods to be ca
191
195
Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.
192
196
193
197
**[2]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
194
-
195
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
196
-
to trigger cardinality limits, degrading the usefulness of the metric.
198
+
> **Warning**
199
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
200
+
> to trigger cardinality limits, degrading the usefulness of the metric.
197
201
198
202
**[3]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
199
-
200
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
201
-
to trigger cardinality limits, degrading the usefulness of the metric.
203
+
> **Warning**
204
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
205
+
> to trigger cardinality limits, degrading the usefulness of the metric.
202
206
203
207
`http.request.method` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
204
208
@@ -283,10 +287,14 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
283
287
**[5]:**`network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
284
288
285
289
**[6]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
286
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
290
+
> **Warning**
291
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
292
+
> to trigger cardinality limits, degrading the usefulness of the metric.
287
293
288
294
**[7]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
289
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
295
+
> **Warning**
296
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
297
+
> to trigger cardinality limits, degrading the usefulness of the metric.
290
298
291
299
**[8]:** The scheme of the original client request, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded), [X-Forwarded-Proto](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Proto), or a similar header). Otherwise, the scheme of the immediate peer request.
292
300
@@ -379,10 +387,14 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
379
387
**[5]:**`network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
380
388
381
389
**[6]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
382
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
390
+
> **Warning**
391
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
392
+
> to trigger cardinality limits, degrading the usefulness of the metric.
383
393
384
394
**[7]:** See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).
385
-
> **Warning**: since this attribute may be based on HTTP headers, opting in to it may allow an attacker to trigger cardinality limits, degrading the usefulness of the metric.
395
+
> **Warning**
396
+
> Since this attribute may be based on HTTP headers, opting in to it may allow an attacker
397
+
> to trigger cardinality limits, degrading the usefulness of the metric.
386
398
387
399
**[8]:** The scheme of the original client request, if known (e.g. from [Forwarded](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded), [X-Forwarded-Proto](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Proto), or a similar header). Otherwise, the scheme of the immediate peer request.
Copy file name to clipboardExpand all lines: docs/http/http-spans.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -301,13 +301,13 @@ HTTP requests sent to the same domain name may be handled by multiple applicatio
301
301
For example, different versions of the same web-application can run side-by-side as independent applications behind the reverse proxy which routes request to one or another based on the request path.
302
302
303
303
Instances of different HTTP server applications may run on the same physical host and share the same IP address, but listen to different TCP/UDP ports.
304
-
In order to route request to a specific application, reverse proxies usually modify the [HTTP Host header][Host and authority] replacing the original value provided by the client with an actual proxied server name. This behavior depends on the reverse proxy configuration. In some cases, `Host` header is not used when routing request to a specific application, making it prone to having bogus content.
304
+
In order to route the request to a specific application, reverse proxies usually modify the [HTTP Host header][Host and authority] replacing the original value provided by the client with an actual proxied server name. This behavior depends on the reverse proxy configuration. In some cases, the`Host` header is not used when routing request to a specific application, making it prone to having bogus content.
305
305
306
306
HTTP server frameworks and their instrumentations have limited knowledge about the HTTP infrastructure and intermediaries that requests go through. In a general case, they can only use HTTP request properties such as request target or headers to populate `server.*` attributes.
307
307
308
308
#### Setting `server.address` and `server.port` attributes
309
309
310
-
In the context of HTTP server, `server.address` and `server.port` attributes capture the original host name and port. The are intended, whenever possible, to be the same on the client and server sides.
310
+
In the context of HTTP server, `server.address` and `server.port` attributes capture the original host name and port. They are intended, whenever possible, to be the same on the client and server sides.
311
311
312
312
HTTP server instrumentations SHOULD do the best effort when populating `server.address` and `server.port` attributes and SHOULD determine them by using the first of the following that applies:
0 commit comments