network_attributes.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace network
  16. {
  17. /**
  18. The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.
  19. */
  20. static constexpr const char *kNetworkCarrierIcc = "network.carrier.icc";
  21. /**
  22. The mobile carrier country code.
  23. */
  24. static constexpr const char *kNetworkCarrierMcc = "network.carrier.mcc";
  25. /**
  26. The mobile carrier network code.
  27. */
  28. static constexpr const char *kNetworkCarrierMnc = "network.carrier.mnc";
  29. /**
  30. The name of the mobile carrier.
  31. */
  32. static constexpr const char *kNetworkCarrierName = "network.carrier.name";
  33. /**
  34. The state of network connection
  35. <p>
  36. Connection states are defined as part of the <a
  37. href="https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2">rfc9293</a>
  38. */
  39. static constexpr const char *kNetworkConnectionState = "network.connection.state";
  40. /**
  41. This describes more details regarding the connection.type. It may be the type of cell technology
  42. connection, but it could be used for describing details about a wifi connection.
  43. */
  44. static constexpr const char *kNetworkConnectionSubtype = "network.connection.subtype";
  45. /**
  46. The internet connection type.
  47. */
  48. static constexpr const char *kNetworkConnectionType = "network.connection.type";
  49. /**
  50. The network interface name.
  51. */
  52. static constexpr const char *kNetworkInterfaceName = "network.interface.name";
  53. /**
  54. The network IO operation direction.
  55. */
  56. static constexpr const char *kNetworkIoDirection = "network.io.direction";
  57. /**
  58. Local address of the network connection - IP address or Unix domain socket name.
  59. */
  60. static constexpr const char *kNetworkLocalAddress = "network.local.address";
  61. /**
  62. Local port number of the network connection.
  63. */
  64. static constexpr const char *kNetworkLocalPort = "network.local.port";
  65. /**
  66. Peer address of the network connection - IP address or Unix domain socket name.
  67. */
  68. static constexpr const char *kNetworkPeerAddress = "network.peer.address";
  69. /**
  70. Peer port number of the network connection.
  71. */
  72. static constexpr const char *kNetworkPeerPort = "network.peer.port";
  73. /**
  74. <a href="https://wikipedia.org/wiki/Application_layer">OSI application layer</a> or non-OSI
  75. equivalent. <p> The value SHOULD be normalized to lowercase.
  76. */
  77. static constexpr const char *kNetworkProtocolName = "network.protocol.name";
  78. /**
  79. The actual version of the protocol used for network communication.
  80. <p>
  81. If protocol version is subject to negotiation (for example using <a
  82. href="https://www.rfc-editor.org/rfc/rfc7301.html">ALPN</a>), this attribute SHOULD be set to the
  83. negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
  84. */
  85. static constexpr const char *kNetworkProtocolVersion = "network.protocol.version";
  86. /**
  87. <a href="https://wikipedia.org/wiki/Transport_layer">OSI transport layer</a> or <a
  88. href="https://wikipedia.org/wiki/Inter-process_communication">inter-process communication
  89. method</a>. <p> The value SHOULD be normalized to lowercase. <p> Consider always setting the
  90. transport when setting a port number, since a port number is ambiguous without knowing the
  91. transport. For example different processes could be listening on TCP port 12345 and UDP port
  92. 12345.
  93. */
  94. static constexpr const char *kNetworkTransport = "network.transport";
  95. /**
  96. <a href="https://wikipedia.org/wiki/Network_layer">OSI network layer</a> or non-OSI equivalent.
  97. <p>
  98. The value SHOULD be normalized to lowercase.
  99. */
  100. static constexpr const char *kNetworkType = "network.type";
  101. namespace NetworkConnectionStateValues
  102. {
  103. /**
  104. none
  105. */
  106. static constexpr const char *kClosed = "closed";
  107. /**
  108. none
  109. */
  110. static constexpr const char *kCloseWait = "close_wait";
  111. /**
  112. none
  113. */
  114. static constexpr const char *kClosing = "closing";
  115. /**
  116. none
  117. */
  118. static constexpr const char *kEstablished = "established";
  119. /**
  120. none
  121. */
  122. static constexpr const char *kFinWait1 = "fin_wait_1";
  123. /**
  124. none
  125. */
  126. static constexpr const char *kFinWait2 = "fin_wait_2";
  127. /**
  128. none
  129. */
  130. static constexpr const char *kLastAck = "last_ack";
  131. /**
  132. none
  133. */
  134. static constexpr const char *kListen = "listen";
  135. /**
  136. none
  137. */
  138. static constexpr const char *kSynReceived = "syn_received";
  139. /**
  140. none
  141. */
  142. static constexpr const char *kSynSent = "syn_sent";
  143. /**
  144. none
  145. */
  146. static constexpr const char *kTimeWait = "time_wait";
  147. } // namespace NetworkConnectionStateValues
  148. namespace NetworkConnectionSubtypeValues
  149. {
  150. /**
  151. GPRS
  152. */
  153. static constexpr const char *kGprs = "gprs";
  154. /**
  155. EDGE
  156. */
  157. static constexpr const char *kEdge = "edge";
  158. /**
  159. UMTS
  160. */
  161. static constexpr const char *kUmts = "umts";
  162. /**
  163. CDMA
  164. */
  165. static constexpr const char *kCdma = "cdma";
  166. /**
  167. EVDO Rel. 0
  168. */
  169. static constexpr const char *kEvdo0 = "evdo_0";
  170. /**
  171. EVDO Rev. A
  172. */
  173. static constexpr const char *kEvdoA = "evdo_a";
  174. /**
  175. CDMA2000 1XRTT
  176. */
  177. static constexpr const char *kCdma20001xrtt = "cdma2000_1xrtt";
  178. /**
  179. HSDPA
  180. */
  181. static constexpr const char *kHsdpa = "hsdpa";
  182. /**
  183. HSUPA
  184. */
  185. static constexpr const char *kHsupa = "hsupa";
  186. /**
  187. HSPA
  188. */
  189. static constexpr const char *kHspa = "hspa";
  190. /**
  191. IDEN
  192. */
  193. static constexpr const char *kIden = "iden";
  194. /**
  195. EVDO Rev. B
  196. */
  197. static constexpr const char *kEvdoB = "evdo_b";
  198. /**
  199. LTE
  200. */
  201. static constexpr const char *kLte = "lte";
  202. /**
  203. EHRPD
  204. */
  205. static constexpr const char *kEhrpd = "ehrpd";
  206. /**
  207. HSPAP
  208. */
  209. static constexpr const char *kHspap = "hspap";
  210. /**
  211. GSM
  212. */
  213. static constexpr const char *kGsm = "gsm";
  214. /**
  215. TD-SCDMA
  216. */
  217. static constexpr const char *kTdScdma = "td_scdma";
  218. /**
  219. IWLAN
  220. */
  221. static constexpr const char *kIwlan = "iwlan";
  222. /**
  223. 5G NR (New Radio)
  224. */
  225. static constexpr const char *kNr = "nr";
  226. /**
  227. 5G NRNSA (New Radio Non-Standalone)
  228. */
  229. static constexpr const char *kNrnsa = "nrnsa";
  230. /**
  231. LTE CA
  232. */
  233. static constexpr const char *kLteCa = "lte_ca";
  234. } // namespace NetworkConnectionSubtypeValues
  235. namespace NetworkConnectionTypeValues
  236. {
  237. /**
  238. none
  239. */
  240. static constexpr const char *kWifi = "wifi";
  241. /**
  242. none
  243. */
  244. static constexpr const char *kWired = "wired";
  245. /**
  246. none
  247. */
  248. static constexpr const char *kCell = "cell";
  249. /**
  250. none
  251. */
  252. static constexpr const char *kUnavailable = "unavailable";
  253. /**
  254. none
  255. */
  256. static constexpr const char *kUnknown = "unknown";
  257. } // namespace NetworkConnectionTypeValues
  258. namespace NetworkIoDirectionValues
  259. {
  260. /**
  261. none
  262. */
  263. static constexpr const char *kTransmit = "transmit";
  264. /**
  265. none
  266. */
  267. static constexpr const char *kReceive = "receive";
  268. } // namespace NetworkIoDirectionValues
  269. namespace NetworkTransportValues
  270. {
  271. /**
  272. TCP
  273. */
  274. static constexpr const char *kTcp = "tcp";
  275. /**
  276. UDP
  277. */
  278. static constexpr const char *kUdp = "udp";
  279. /**
  280. Named or anonymous pipe.
  281. */
  282. static constexpr const char *kPipe = "pipe";
  283. /**
  284. Unix domain socket
  285. */
  286. static constexpr const char *kUnix = "unix";
  287. /**
  288. QUIC
  289. */
  290. static constexpr const char *kQuic = "quic";
  291. } // namespace NetworkTransportValues
  292. namespace NetworkTypeValues
  293. {
  294. /**
  295. IPv4
  296. */
  297. static constexpr const char *kIpv4 = "ipv4";
  298. /**
  299. IPv6
  300. */
  301. static constexpr const char *kIpv6 = "ipv6";
  302. } // namespace NetworkTypeValues
  303. } // namespace network
  304. } // namespace semconv
  305. OPENTELEMETRY_END_NAMESPACE