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
+6-24
Original file line number
Diff line number
Diff line change
@@ -476,15 +476,9 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
476
476
477
477
**[4]:**`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`.
478
478
479
-
**[5]:**Determined by using the first of the following that applies:
479
+
**[5]:**If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
480
480
481
-
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) if it's sent in absolute-form.
482
-
- Host identifier of the `Host` header.
483
-
484
-
If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
485
-
`server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
486
-
487
-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier; otherwise, it MUST match `Host` header port identifier.
481
+
**[6]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
488
482
489
483
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
490
484
@@ -572,15 +566,9 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
572
566
573
567
**[4]:**`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`.
574
568
575
-
**[5]:** Determined by using the first of the following that applies:
576
-
577
-
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) if it's sent in absolute-form.
578
-
- Host identifier of the `Host` header.
569
+
**[5]:** If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
579
570
580
-
If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
581
-
`server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
582
-
583
-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier; otherwise, it MUST match `Host` header port identifier.
571
+
**[6]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
584
572
585
573
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
586
574
@@ -668,15 +656,9 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original
668
656
669
657
**[4]:**`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`.
670
658
671
-
**[5]:** Determined by using the first of the following that applies:
672
-
673
-
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) if it's sent in absolute-form.
674
-
- Host identifier of the `Host` header.
675
-
676
-
If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
677
-
`server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
659
+
**[5]:** If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
678
660
679
-
**[6]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port`MUST match URI port identifier; otherwise, it MUST match `Host` header port identifier.
661
+
**[6]:** When observed from the client side, and when communicating through an intermediary, `server.port`SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
680
662
681
663
**[7]:** If not default (`80` for `http` scheme, `443` for `https`).
Copy file name to clipboardExpand all lines: docs/http/http-spans.md
+4-19
Original file line number
Diff line number
Diff line change
@@ -240,15 +240,9 @@ For an HTTP client span, `SpanKind` MUST be `Client`.
240
240
241
241
**[1]:** The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).
242
242
243
-
**[2]:**Determined by using the first of the following that applies:
243
+
**[2]:**If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
244
244
245
-
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) if it's sent in absolute-form.
246
-
- Host identifier of the `Host` header.
247
-
248
-
If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
249
-
`server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
250
-
251
-
**[3]:** When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier; otherwise, it MUST match `Host` header port identifier.
245
+
**[3]:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
252
246
253
247
**[4]:** If not default (`80` for `http` scheme, `443` for `https`).
254
248
@@ -313,22 +307,16 @@ In order to route request to a specific application, reverse proxies usually mod
313
307
314
308
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.
315
309
316
-
Certain web frameworks may provide additional information about server. For example CGI specification defines `SERVER_NAME` and `SERVER_PORT` ([RFC 3875][rfc-servername]) variables. HTTP servers usually know server names as they are provided by users in the configuration. See for example, the Apache [`ServerName`][ap-sn] or NGINX [`server_name`][nx-sn] directive.
317
-
318
-
Still, the original logical server name might not be available to the HTTP server instrumentation or can be inaccurate.
319
-
320
310
#### Setting `server.address` and `server.port` attributes
321
311
322
-
In the context of HTTP server, `server.address` and `server.port` attributes capture logical host and port name and intended, whenever possible, to be the same on the client and server sides.
312
+
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.
323
313
324
314
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:
325
315
326
316
* The original host which may be passed by the reverse proxy in the [`Forwarded#host`][Forwarded], [`X-Forwarded-Host`][X-Forwarded-Host], or a similar header.
327
-
* Server name and port available through web framework or HTTP server properties if they're based on the user configuration. Instrumentations SHOULD NOT use properties that rely on the `Host` header.
328
-
* The [request target][request target] if it's passed in the absolute form.
329
317
* The `Host` header.
330
318
331
-
> **Note**: The `Host` header specifies host and port number of the server. The same applies to the `host` identifier of `Forwarded` header, the `X-Forwarded-Host` header, or the authority component in the request target. Instrumentations SHOULD populate both `server.address` and `server.port` attributes by parsing the applicable property.
319
+
> **Note**: The `Host` header specifies host and port number of the server. The same applies to the `host` identifier of `Forwarded` header or the `X-Forwarded-Host` header. Instrumentations SHOULD populate both `server.address` and `server.port` attributes by parsing the value of corresponding header.
332
320
333
321
Application developers MAY overwrite potentially inaccurate values of `server.*` attributes using a [SpanProcessor][SpanProcessor] and MAY capture private host information using applicable [resource attributes](/docs/resource/README.md).
334
322
@@ -344,9 +332,6 @@ Application developers MAY overwrite potentially inaccurate values of `server.*`
0 commit comments