Network

These attributes may be used for any network related operation.

Network Attributes

AttributeTypeDescriptionExamples
network.carrier.iccstringThe ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.DE
network.carrier.mccstringThe mobile carrier country code.310
network.carrier.mncstringThe mobile carrier network code.001
network.carrier.namestringThe name of the mobile carrier.sprint
network.connection.subtypestringThis describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.LTE
network.connection.typestringThe internet connection type.wifi
network.local.addressstringStable
Local address of the network connection - IP address or Unix domain socket name.
10.1.2.80; /tmp/my.sock
network.local.portintStable
Local port number of the network connection.
65123
network.peer.addressstringStable
Peer address of the network connection - IP address or Unix domain socket name.
10.1.2.80; /tmp/my.sock
network.peer.portintStable
Peer port number of the network connection.
65123
network.protocol.namestringStable
OSI application layer or non-OSI equivalent. [1]
amqp; http; mqtt
network.protocol.versionstringStable
Version of the protocol specified in network.protocol.name. [2]
3.1.1
network.transportstringStable
OSI transport layer or inter-process communication method. [3]
tcp; udp
network.typestringStable
OSI network layer or non-OSI equivalent. [4]
ipv4; ipv6

[1]: The value SHOULD be normalized to lowercase.

[2]: 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.

[3]: The value SHOULD be normalized to lowercase.

Consider always setting the transport when setting a port number, since a port number is ambiguous without knowing the transport. For example different processes could be listening on TCP port 12345 and UDP port 12345.

[4]: The value SHOULD be normalized to lowercase.

network.connection.subtype 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.

ValueDescription
gprsGPRS
edgeEDGE
umtsUMTS
cdmaCDMA
evdo_0EVDO Rel. 0
evdo_aEVDO Rev. A
cdma2000_1xrttCDMA2000 1XRTT
hsdpaHSDPA
hsupaHSUPA
hspaHSPA
idenIDEN
evdo_bEVDO Rev. B
lteLTE
ehrpdEHRPD
hspapHSPAP
gsmGSM
td_scdmaTD-SCDMA
iwlanIWLAN
nr5G NR (New Radio)
nrnsa5G NRNSA (New Radio Non-Standalone)
lte_caLTE CA

network.connection.type 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.

ValueDescription
wifiwifi
wiredwired
cellcell
unavailableunavailable
unknownunknown

network.transport 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.

ValueDescription
tcpTCP
udpUDP
pipeNamed or anonymous pipe.
unixUnix domain socket

network.type 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.

ValueDescription
ipv4IPv4
ipv6IPv6

Deprecated Network Attributes

AttributeTypeDescriptionExamples
net.host.namestringDeprecated, use server.address.example.com
net.host.portintDeprecated, use server.port.8080
net.peer.namestringDeprecated, use server.address on client spans and client.address on server spans.example.com
net.peer.portintDeprecated, use server.port on client spans and client.port on server spans.8080
net.protocol.namestringDeprecated, use network.protocol.name.amqp; http; mqtt
net.protocol.versionstringDeprecated, use network.protocol.version.3.1.1
net.sock.familystringDeprecated, use network.transport and network.type.inet
net.sock.host.addrstringDeprecated, use network.local.address./var/my.sock
net.sock.host.portintDeprecated, use network.local.port.8080
net.sock.peer.addrstringDeprecated, use network.peer.address.192.168.0.1
net.sock.peer.namestringDeprecated, no replacement at this time./var/my.sock
net.sock.peer.portintDeprecated, use network.peer.port.65531
net.transportstringDeprecated, use network.transport.ip_tcp

net.sock.family 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.

ValueDescription
inetIPv4 address
inet6IPv6 address
unixUnix domain socket path

net.transport 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.

ValueDescription
ip_tcpip_tcp
ip_udpip_udp
pipeNamed or anonymous pipe.
inprocIn-process communication. [1]
otherSomething else (non IP-based).

[1]: Signals that there is only in-process communication not using a “real” network protocol in cases where network attributes would normally be expected. Usually all other network attributes can be left out in that case.