network_attributes.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. Local address of the network connection - IP address or Unix domain socket name.
  19. */
  20. static constexpr const char *kNetworkLocalAddress = "network.local.address";
  21. /**
  22. Local port number of the network connection.
  23. */
  24. static constexpr const char *kNetworkLocalPort = "network.local.port";
  25. /**
  26. Peer address of the network connection - IP address or Unix domain socket name.
  27. */
  28. static constexpr const char *kNetworkPeerAddress = "network.peer.address";
  29. /**
  30. Peer port number of the network connection.
  31. */
  32. static constexpr const char *kNetworkPeerPort = "network.peer.port";
  33. /**
  34. <a href="https://wikipedia.org/wiki/Application_layer">OSI application layer</a> or non-OSI
  35. equivalent. <p> The value SHOULD be normalized to lowercase.
  36. */
  37. static constexpr const char *kNetworkProtocolName = "network.protocol.name";
  38. /**
  39. The actual version of the protocol used for network communication.
  40. <p>
  41. If protocol version is subject to negotiation (for example using <a
  42. href="https://www.rfc-editor.org/rfc/rfc7301.html">ALPN</a>), this attribute SHOULD be set to the
  43. negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
  44. */
  45. static constexpr const char *kNetworkProtocolVersion = "network.protocol.version";
  46. /**
  47. <a href="https://wikipedia.org/wiki/Transport_layer">OSI transport layer</a> or <a
  48. href="https://wikipedia.org/wiki/Inter-process_communication">inter-process communication
  49. method</a>. <p> The value SHOULD be normalized to lowercase. <p> Consider always setting the
  50. transport when setting a port number, since a port number is ambiguous without knowing the
  51. transport. For example different processes could be listening on TCP port 12345 and UDP port
  52. 12345.
  53. */
  54. static constexpr const char *kNetworkTransport = "network.transport";
  55. /**
  56. <a href="https://wikipedia.org/wiki/Network_layer">OSI network layer</a> or non-OSI equivalent.
  57. <p>
  58. The value SHOULD be normalized to lowercase.
  59. */
  60. static constexpr const char *kNetworkType = "network.type";
  61. namespace NetworkTransportValues
  62. {
  63. /**
  64. TCP
  65. */
  66. static constexpr const char *kTcp = "tcp";
  67. /**
  68. UDP
  69. */
  70. static constexpr const char *kUdp = "udp";
  71. /**
  72. Named or anonymous pipe.
  73. */
  74. static constexpr const char *kPipe = "pipe";
  75. /**
  76. Unix domain socket
  77. */
  78. static constexpr const char *kUnix = "unix";
  79. /**
  80. QUIC
  81. */
  82. static constexpr const char *kQuic = "quic";
  83. } // namespace NetworkTransportValues
  84. namespace NetworkTypeValues
  85. {
  86. /**
  87. IPv4
  88. */
  89. static constexpr const char *kIpv4 = "ipv4";
  90. /**
  91. IPv6
  92. */
  93. static constexpr const char *kIpv6 = "ipv6";
  94. } // namespace NetworkTypeValues
  95. } // namespace network
  96. } // namespace semconv
  97. OPENTELEMETRY_END_NAMESPACE