diff --git a/model/client.yaml b/model/client.yaml index d1d9502183..0aa7338dd0 100644 --- a/model/client.yaml +++ b/model/client.yaml @@ -16,7 +16,7 @@ groups: note: > When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries (e.g. proxies) if it's available. - examples: ['/tmp/my.sock', '10.1.2.80'] + examples: ['client.example.com', '10.1.2.80', '/tmp/my.sock'] - id: port type: int brief: Client port number. @@ -24,23 +24,14 @@ groups: note: > When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries (e.g. proxies) if it's available. - - id: socket.address + - id: ip type: string - brief: Client address of the socket connection - IP address or Unix domain socket name. + brief: Client IP address. note: > - When observed from the server side, this SHOULD represent the immediate client peer address. + When observed from the server side, and when communicating through an intermediary, `client.ip` SHOULD represent + the client IP address behind any intermediaries (e.g. proxies) if it's available. - When observed from the client side, this SHOULD represent the physical client address. - examples: ['/tmp/my.sock', '127.0.0.1'] + When observed from the client side, this SHOULD represent the physical client IP address. + examples: ['127.0.0.1'] requirement_level: recommended: If different than `client.address`. - - id: socket.port - type: int - brief: Client port number of the socket connection. - note: > - When observed from the server side, this SHOULD represent the immediate client peer port. - - When observed from the client side, this SHOULD represent the physical client port. - examples: [35555] - requirement_level: - recommended: If different than `client.port`. diff --git a/model/deprecated/network.yaml b/model/deprecated/network.yaml index 17b75b90e3..6b87f56d04 100644 --- a/model/deprecated/network.yaml +++ b/model/deprecated/network.yaml @@ -8,19 +8,20 @@ groups: - id: sock.peer.name type: string stability: deprecated - brief: Deprecated, use `server.socket.domain` on client spans. + brief: Deprecated, since this was intended to be used for proxies on client spans, use `proxy.address`. examples: ['/var/my.sock'] - id: sock.peer.addr type: string stability: deprecated brief: > - Deprecated, use `server.socket.address` on client spans and `client.socket.address` on server spans. + Deprecated, if this doesn't represent a proxy address, use `server.ip` on client spans and `client.ip` on server spans. + If this represents a proxy address, use `proxy.address`. examples: ['192.168.0.1'] - id: sock.peer.port type: int stability: deprecated examples: [65531] - brief: Deprecated, use `server.socket.port` on client spans and `client.socket.port` on server spans. + brief: Deprecated, since this was intended to be used for proxies, use `proxy.port`. - id: peer.name type: string stability: deprecated @@ -44,12 +45,12 @@ groups: - id: sock.host.addr type: string stability: deprecated - brief: Deprecated, use `server.socket.address`. + brief: Deprecated, use `server.ip`. examples: ['/var/my.sock'] - id: sock.host.port type: int stability: deprecated - brief: Deprecated, use `server.socket.port`. + brief: Deprecated, use `server.port`. examples: [8080] - id: transport type: diff --git a/model/metrics/http.yaml b/model/metrics/http.yaml index f6354aa7d5..829f7d5673 100644 --- a/model/metrics/http.yaml +++ b/model/metrics/http.yaml @@ -66,7 +66,7 @@ groups: - ref: http.response.status_code - ref: network.protocol.name - ref: network.protocol.version - - ref: server.socket.address + - ref: server.ip - ref: error.type requirement_level: conditionally_required: If request has ended with an error. diff --git a/model/metrics/rpc-metrics.yaml b/model/metrics/rpc-metrics.yaml index 237107e6d8..f46fdd6fee 100644 --- a/model/metrics/rpc-metrics.yaml +++ b/model/metrics/rpc-metrics.yaml @@ -13,8 +13,7 @@ groups: - ref: network.type - ref: server.address - ref: server.port - - ref: server.socket.address - - ref: server.socket.port + - ref: server.ip # RPC Server metrics - id: metric.rpc.server.duration diff --git a/model/proxy.yaml b/model/proxy.yaml new file mode 100644 index 0000000000..5a67f134a6 --- /dev/null +++ b/model/proxy.yaml @@ -0,0 +1,20 @@ +groups: + - id: proxy + prefix: proxy + type: attribute_group + brief: These attributes may be used to describe a proxy (or other intermediary) in a connection-based network interaction. + attributes: + - id: address + type: string + brief: Proxy address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name. + examples: ['proxy.example.com', '10.1.2.80', '/tmp/my.sock'] + - id: port + type: int + brief: Proxy port number. + examples: [65123] + - id: ip + type: string + brief: Proxy IP address. + examples: ['10.1.2.80'] + requirement_level: + recommended: If different than `proxy.address`. diff --git a/model/server.yaml b/model/server.yaml index aed9184905..f504331f63 100644 --- a/model/server.yaml +++ b/model/server.yaml @@ -16,7 +16,7 @@ groups: note: | When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries (e.g. proxies) if it's available. - examples: ['example.com'] + examples: ['example.com', '10.1.2.80', '/tmp/my.sock'] - id: port type: int brief: Server port number @@ -24,30 +24,14 @@ groups: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries (e.g. proxies) if it's available. examples: [80, 8080, 443] - - id: socket.domain + - id: ip type: string - brief: Immediate server peer's domain name if available without reverse DNS lookup - examples: ['proxy.example.com'] - note: Typically observed from the client side, and represents a proxy or other intermediary domain name. - requirement_level: - recommended: If different than `server.address`. - - id: socket.address - type: string - brief: Server address of the socket connection - IP address or Unix domain socket name. + brief: Server IP address. note: > - When observed from the client side, this SHOULD represent the immediate server peer address. + When observed from the client side, and when communicating through an intermediary, `server.ip` SHOULD represent + the server IP address behind any intermediaries (e.g. proxies) if it's available. - When observed from the server side, this SHOULD represent the physical server address. + When observed from the server side, this SHOULD represent the physical server IP address. examples: ['10.5.3.2'] requirement_level: recommended: If different than `server.address`. - - id: socket.port - type: int - brief: Server port number of the socket connection. - note: > - When observed from the client side, this SHOULD represent the immediate server peer port. - - When observed from the server side, this SHOULD represent the physical server port. - examples: [16456] - requirement_level: - recommended: If different than `server.port`. diff --git a/model/trace/database.yaml b/model/trace/database.yaml index 2348a2a0f0..84943afaf9 100644 --- a/model/trace/database.yaml +++ b/model/trace/database.yaml @@ -238,21 +238,18 @@ groups: tag: connection-level requirement_level: conditionally_required: If using a port other than the default port for this DBMS and if `server.address` is set. - - ref: server.socket.address - tag: connection-level - - ref: server.socket.port + - ref: server.ip tag: connection-level - ref: network.transport tag: connection-level - ref: network.type tag: connection-level - - ref: server.socket.domain - requirement_level: - recommended: If different than `server.address` and if `server.socket.address` is set. - constraints: - - any_of: - - 'server.address' - - 'server.socket.address' + - ref: proxy.address + tag: connection-level + - ref: proxy.port + tag: connection-level + - ref: proxy.ip + tag: connection-level - id: db.mssql prefix: db.mssql diff --git a/model/trace/http.yaml b/model/trace/http.yaml index 53898fb483..3bb0bece91 100644 --- a/model/trace/http.yaml +++ b/model/trace/http.yaml @@ -77,9 +77,10 @@ groups: note: > 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. - - ref: server.socket.domain - - ref: server.socket.address - - ref: server.socket.port + - ref: server.ip + - ref: proxy.address + - ref: proxy.port + - ref: proxy.ip - ref: url.full sampling_relevant: true requirement_level: required @@ -120,12 +121,9 @@ groups: - Port identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) if it's sent in absolute-form. - Port identifier of the `Host` header - - ref: server.socket.address + - ref: server.ip requirement_level: opt_in - brief: Local socket address. Useful in case of a multi-IP host. - - ref: server.socket.port - requirement_level: opt_in - brief: Local socket port. Useful in case of a multi-port host. + brief: Local socket IP address. Useful in case of a multi-IP host. - ref: client.address note: > The IP address of the original client behind all proxies, if @@ -138,8 +136,10 @@ groups: The port of the original client behind all proxies, if known (e.g. from [Forwarded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) or a similar header). Otherwise, the immediate client peer port. - - ref: client.socket.address - - ref: client.socket.port + - ref: client.ip + - ref: proxy.address + - ref: proxy.port + - ref: proxy.ip - ref: url.path requirement_level: required sampling_relevant: true diff --git a/model/trace/messaging.yaml b/model/trace/messaging.yaml index bb7a768638..b9e7b2bd85 100644 --- a/model/trace/messaging.yaml +++ b/model/trace/messaging.yaml @@ -167,18 +167,18 @@ groups: This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from. requirement_level: conditionally_required: If available. - - ref: server.socket.address - tag: connection-level - - ref: server.socket.port + - ref: server.ip tag: connection-level - ref: network.transport tag: connection-level - ref: network.type tag: connection-level - - ref: server.socket.domain + - ref: proxy.address + tag: connection-level + - ref: proxy.port + tag: connection-level + - ref: proxy.ip tag: connection-level - requirement_level: - recommended: If different than `server.address` and if `server.socket.address` is set. - ref: network.protocol.name examples: ['amqp', 'mqtt'] - ref: network.protocol.version diff --git a/model/trace/rpc.yaml b/model/trace/rpc.yaml index d2aab9a5ed..90ba9fb898 100644 --- a/model/trace/rpc.yaml +++ b/model/trace/rpc.yaml @@ -49,10 +49,6 @@ groups: (e.g., method actually executing the call on the server side, RPC client stub method on the client side). examples: "exampleMethod" - - ref: server.socket.address - - ref: server.socket.port - requirement_level: - recommended: If different than `server.port` and if `server.socket.address` is set. - ref: network.transport - ref: network.type - ref: server.address @@ -66,19 +62,15 @@ groups: - ref: server.port requirement_level: conditionally_required: See below - constraints: - - any_of: - - server.socket.address - - server.address + - ref: server.ip + - ref: proxy.address + - ref: proxy.port + - ref: proxy.ip - id: rpc.client type: span brief: 'This document defines semantic conventions for remote procedure call client spans.' extends: rpc - attributes: - - ref: server.socket.domain - requirement_level: - recommended: If different than `server.address` and if `server.socket.address` is set. - id: rpc.server prefix: rpc @@ -89,8 +81,7 @@ groups: attributes: - ref: client.address - ref: client.port - - ref: client.socket.address - - ref: client.socket.port + - ref: client.ip - ref: network.transport - ref: network.type