Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b555081
Align network attributes with ECS
Apr 14, 2023
cb420e2
up
Apr 15, 2023
fbcf76f
changelog
Apr 15, 2023
5adafdd
nits and missing parts
Apr 15, 2023
1e4aed9
lint
Apr 15, 2023
9ef2caf
add source and destination and fix some nits
Apr 20, 2023
a479795
Update specification/trace/semantic_conventions/span-general.md
Apr 20, 2023
795eee7
Update semantic_conventions/trace/source.yaml
Apr 20, 2023
4342d40
cleanups and move new conventions to comon folder
Apr 20, 2023
264214e
bookmarks
Apr 20, 2023
7cc0802
lint
Apr 20, 2023
f52780c
Update CHANGELOG.md
Apr 21, 2023
af08a7f
Update schemas/1.21.0
Apr 21, 2023
ed33462
Update schemas/1.21.0
Apr 21, 2023
f5cffd7
lint
Apr 21, 2023
7e5c5aa
add client.address and port and add client to rpc trace attributes
Apr 21, 2023
eaa1f87
more nits
Apr 22, 2023
582ead7
more nits
Apr 22, 2023
f92c55d
lint
Apr 22, 2023
e7fbbe1
up
Apr 22, 2023
855d546
move deprecated attributes to a different folder and some cleanups
Apr 24, 2023
3c7c7f1
move server.socket.* from common http attributes to client and server
Apr 25, 2023
22f8e18
PR feedback
Apr 26, 2023
f47e2b1
Apply suggestions from code review
Apr 28, 2023
d6f0a36
regenerate md
Apr 28, 2023
c37b62b
feedback: transformation, server.address for IP
Apr 28, 2023
bbb9f10
remove only from .address condition
Apr 28, 2023
9030cde
Merge branch 'main' into ecs-net-attributes
reyang May 1, 2023
8dedbee
Clarify client/server/source/destination
trask May 2, 2023
41056bb
Merge branch 'main' into ecs-net-attributes
May 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Align network attributes with ECS
  • Loading branch information
Liudmila Molkova committed Apr 28, 2023
commit b55508186d54d3cce307e6486c8048e34b3bb7a8
14 changes: 7 additions & 7 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ groups:
conditionally_required: If and only if one was received/sent.
brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).'
examples: [200]
- ref: net.protocol.name
- ref: network.protocol.name
examples: ['http', 'spdy']
requirement_level:
recommended: if not default (`http`).
- ref: net.protocol.version
- ref: network.protocol.version
examples: ['1.0', '1.1', '2.0']

- id: attributes.http.client
prefix: http
type: attribute_group
brief: 'HTTP Client spans attributes'
attributes:
- ref: net.peer.name
- ref: server.address
requirement_level: required
brief: >
Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.
Expand All @@ -39,13 +39,13 @@ groups:
- Host identifier of the `Host` header

SHOULD NOT be set if capturing it would require an extra DNS lookup.
- ref: net.peer.port
- ref: server.port
requirement_level:
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
brief: >
Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.
note: >
When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `net.peer.name` MUST match
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.

- id: attributes.http.server
Expand All @@ -69,7 +69,7 @@ groups:
MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.

SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one.
- ref: net.host.name
- ref: server.address
requirement_level: required
brief: >
Name of the local HTTP server that received the request.
Expand All @@ -84,7 +84,7 @@ groups:

SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.

- ref: net.host.port
- ref: server.port
requirement_level:
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
brief: >
Expand Down
34 changes: 17 additions & 17 deletions semantic_conventions/metrics/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ groups:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.server.active_requests
type: metric
Expand All @@ -22,7 +22,7 @@ groups:
attributes:
- ref: http.method
- ref: http.scheme
- ref: net.host.name
- ref: server.address
requirement_level: required
brief: >
Name of the local HTTP server that received the request.
Expand All @@ -37,7 +37,7 @@ groups:

SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.

- ref: net.host.port
- ref: server.port
requirement_level:
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
brief: >
Expand All @@ -62,8 +62,8 @@ groups:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.server.response.size
type: metric
Expand All @@ -76,8 +76,8 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.client.duration
type: metric
Expand All @@ -89,9 +89,9 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: net.sock.peer.addr
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address

- id: metric.http.client.request.size
type: metric
Expand All @@ -104,9 +104,9 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: net.sock.peer.addr
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address

- id: metric.http.client.response.size
type: metric
Expand All @@ -119,6 +119,6 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: net.sock.peer.addr
- ref: network.protocol.name
- ref: network.protocol.version
- ref: server.socket.address
14 changes: 14 additions & 0 deletions semantic_conventions/trace/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
groups:
- id: client
prefix: client
type: attribute_group
brief: These attributes may be used for client - initiator of a network connection for events regarding sessions, connections, or bidirectional flow records.
attributes:
- id: socket.address
type: string
brief: Immediate client address - unix domain socket name, IPv4 or IPv6 address.
examples: ['/tmp/my.sock', '127.0.0.1' ]
- id: socket.port
type: int
brief: 'Immediate client port number'
examples: [35555]
24 changes: 12 additions & 12 deletions semantic_conventions/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,33 +228,33 @@ groups:
If the SQL statement has an ambiguous operation, or performs more
than one operation, this value may be omitted.
examples: ['findAndModify', 'HMSET', 'SELECT']
- ref: net.peer.name
- ref: server.address
tag: connection-level
requirement_level:
conditionally_required: See alternative attributes below.
brief: >
Name of the database host.
- ref: net.peer.port
- ref: server.port
tag: connection-level
requirement_level:
conditionally_required: If using a port other than the default port for this DBMS and if `net.peer.name` is set.
- ref: net.sock.peer.addr
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: net.sock.peer.port
- ref: server.socket.port
tag: connection-level
- ref: net.sock.family
- ref: network.type
tag: connection-level
- ref: net.sock.peer.name
- ref: server.socket.domain
requirement_level:
recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set.
- ref: net.transport
recommended: If different than `server.address` and if `server.socket.address` is set.
- ref: network.transport
tag: connection-level
requirement_level:
conditionally_required: If database type is in-process (`"inproc"`), recommended for other database types.
constraints:
- any_of:
- 'net.peer.name'
- 'net.sock.peer.addr'
- 'server.address'
- 'server.socket.address'

- id: db.mssql
prefix: db.mssql
Expand All @@ -267,7 +267,7 @@ groups:
tag: connection-level-tech-specific
type: string
note: >
If setting a `db.mssql.instance_name`, `net.peer.port` is no longer
If setting a `db.mssql.instance_name`, `server.port` is no longer
required (but still recommended if non-standard).
brief: >
The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
Expand Down
132 changes: 80 additions & 52 deletions semantic_conventions/trace/general.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,80 @@
groups:
- id: network-core
- id: network-deprecated
prefix: net
type: attribute_group
brief: >
These attributes may be used for any network related operation.
attributes:
- id: transport
type: string
stability: deprecated
brief: Deprecated, use `network.transport`.
examples: ['ip_tcp']
- id: protocol.name
type: string
stability: deprecated
brief: Deprecated, use `network.protocol.name`.
examples: ['amqp']
- id: protocol.version
type: string
stability: deprecated
brief: Deprecated, use `network.protocol.version`.
examples: ['1.0']
- id: sock.peer.name
type: string
stability: deprecated
brief: Deprecated, use `server.socket.domain` on client spans.
examples: ['/var/my.sock']
- id: sock.peer.addr
type: string
stability: deprecated
brief: >
Deprecated. On client spans use `server.socket.address`, on server spans use `client.socket.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.
- id: sock.family
type: string
stability: deprecated
brief: Deprecated, use `network.type`.
examples: ['inet6']
- id: peer.name
type: string
stability: deprecated
brief: Deprecated, use `server.address`.
examples: ['example.com']
- id: peer.port
type: int
stability: deprecated
brief: Deprecated, use `server.port`.
examples: [8080]
- id: host.name
type: string
stability: deprecated
brief: Deprecated, use `server.address.
examples: ['example.com']
- id: host.port
type: int
stability: deprecated
brief: Deprecated, use `server.port`.
examples: [8080]
- id: sock.host.addr
type: string
stability: deprecated
brief: Deprecated, use `server.socket.address`.
examples: ['/var/my.sock']
- id: sock.host.port
type: int
stability: deprecated
brief: Deprecated, use `server.socket.port`.
examples: [8080]

- id: network-core
prefix: network
type: attribute_group
brief: >
These attributes may be used for any network related operation.
attributes:
Expand Down Expand Up @@ -37,28 +110,10 @@ groups:
brief: 'Version of the application layer protocol used. See note below.'
examples: '3.1.1'
note: >
`net.protocol.version` refers to the version of the protocol used and might be
`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 used has a version
of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
- id: sock.peer.name
type: string
brief: Remote socket peer name.
requirement_level:
recommended: If available and different from `net.peer.name` and if `net.sock.peer.addr` is set.
examples: proxy.example.com
- id: sock.peer.addr
type: string
brief: >
Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication,
[etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
examples: ['127.0.0.1', '/tmp/mysql.sock' ]
- id: sock.peer.port
type: int
brief: Remote socket peer port.
requirement_level:
recommended: If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set.
examples: 16456
- id: sock.family
- id: type
type:
allow_custom_values: true
members:
Expand All @@ -73,41 +128,14 @@ groups:
brief: "Unix domain socket path"
requirement_level:
conditionally_required: >
If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set.
Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr`
if `net.sock.family` is not set. This is to support instrumentations that follow previous versions
If different than `inet` and if any of `server.nat.address` or `client.address` are set.
Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `server.nat.address` and `client.address`
if `network.type` is not set. This is to support instrumentations that follow previous versions
of this document.
brief: >
Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication.
examples: ['inet6', 'bluetooth']
- id: peer.name
type: string
brief: 'Logical remote hostname, see note below.'
examples: 'example.com'
note: >
`net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup.
- id: peer.port
type: int
brief: 'Logical remote port number'
examples: [80, 8080, 443]
- id: host.name
type: string
brief: 'Logical local hostname or similar, see note below.'
examples: 'localhost'
- id: host.port
type: int
brief: 'Logical local port number, preferably the one that the peer used to connect'
examples: 8080
- id: sock.host.addr
type: string
brief: Local socket address. Useful in case of a multi-IP host.
examples: '192.168.0.1'
- id: sock.host.port
type: int
brief: 'Local socket port number.'
requirement_level:
conditionally_required: If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this.
examples: 35555

- id: network-connection-and-carrier
prefix: net
type: attribute_group
Expand Down
Loading