tls_attributes.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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 tls
  16. {
  17. /**
  18. String indicating the <a
  19. href="https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5">cipher</a> used during the
  20. current connection. <p> The values allowed for @code tls.cipher @endcode MUST be one of the @code
  21. Descriptions @endcode of the <a
  22. href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4">registered
  23. TLS Cipher Suits</a>.
  24. */
  25. static constexpr const char *kTlsCipher = "tls.cipher";
  26. /**
  27. PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of
  28. @code client.certificate_chain @endcode since this value also exists in that list.
  29. */
  30. static constexpr const char *kTlsClientCertificate = "tls.client.certificate";
  31. /**
  32. Array of PEM-encoded certificates that make up the certificate chain offered by the client. This
  33. is usually mutually-exclusive of @code client.certificate @endcode since that value should be the
  34. first certificate in the chain.
  35. */
  36. static constexpr const char *kTlsClientCertificateChain = "tls.client.certificate_chain";
  37. /**
  38. Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the
  39. client. For consistency with other hash values, this value should be formatted as an uppercase
  40. hash.
  41. */
  42. static constexpr const char *kTlsClientHashMd5 = "tls.client.hash.md5";
  43. /**
  44. Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the
  45. client. For consistency with other hash values, this value should be formatted as an uppercase
  46. hash.
  47. */
  48. static constexpr const char *kTlsClientHashSha1 = "tls.client.hash.sha1";
  49. /**
  50. Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by
  51. the client. For consistency with other hash values, this value should be formatted as an uppercase
  52. hash.
  53. */
  54. static constexpr const char *kTlsClientHashSha256 = "tls.client.hash.sha256";
  55. /**
  56. Distinguished name of <a
  57. href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6">subject</a> of the issuer of
  58. the x.509 certificate presented by the client.
  59. */
  60. static constexpr const char *kTlsClientIssuer = "tls.client.issuer";
  61. /**
  62. A hash that identifies clients based on how they perform an SSL/TLS handshake.
  63. */
  64. static constexpr const char *kTlsClientJa3 = "tls.client.ja3";
  65. /**
  66. Date/Time indicating when client certificate is no longer considered valid.
  67. */
  68. static constexpr const char *kTlsClientNotAfter = "tls.client.not_after";
  69. /**
  70. Date/Time indicating when client certificate is first considered valid.
  71. */
  72. static constexpr const char *kTlsClientNotBefore = "tls.client.not_before";
  73. /**
  74. Deprecated, use @code server.address @endcode instead.
  75. @deprecated
  76. {"note": "Replaced by @code server.address @endcode.", "reason": "renamed", "renamed_to":
  77. "server.address"}
  78. */
  79. OPENTELEMETRY_DEPRECATED static constexpr const char *kTlsClientServerName =
  80. "tls.client.server_name";
  81. /**
  82. Distinguished name of subject of the x.509 certificate presented by the client.
  83. */
  84. static constexpr const char *kTlsClientSubject = "tls.client.subject";
  85. /**
  86. Array of ciphers offered by the client during the client hello.
  87. */
  88. static constexpr const char *kTlsClientSupportedCiphers = "tls.client.supported_ciphers";
  89. /**
  90. String indicating the curve used for the given cipher, when applicable
  91. */
  92. static constexpr const char *kTlsCurve = "tls.curve";
  93. /**
  94. Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted
  95. tunnel.
  96. */
  97. static constexpr const char *kTlsEstablished = "tls.established";
  98. /**
  99. String indicating the protocol being tunneled. Per the values in the <a
  100. href="https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids">IANA
  101. registry</a>, this string should be lower case.
  102. */
  103. static constexpr const char *kTlsNextProtocol = "tls.next_protocol";
  104. /**
  105. Normalized lowercase protocol name parsed from original string of the negotiated <a
  106. href="https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values">SSL/TLS protocol
  107. version</a>
  108. */
  109. static constexpr const char *kTlsProtocolName = "tls.protocol.name";
  110. /**
  111. Numeric part of the version parsed from the original string of the negotiated <a
  112. href="https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values">SSL/TLS protocol
  113. version</a>
  114. */
  115. static constexpr const char *kTlsProtocolVersion = "tls.protocol.version";
  116. /**
  117. Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
  118. */
  119. static constexpr const char *kTlsResumed = "tls.resumed";
  120. /**
  121. PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of
  122. @code server.certificate_chain @endcode since this value also exists in that list.
  123. */
  124. static constexpr const char *kTlsServerCertificate = "tls.server.certificate";
  125. /**
  126. Array of PEM-encoded certificates that make up the certificate chain offered by the server. This
  127. is usually mutually-exclusive of @code server.certificate @endcode since that value should be the
  128. first certificate in the chain.
  129. */
  130. static constexpr const char *kTlsServerCertificateChain = "tls.server.certificate_chain";
  131. /**
  132. Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the
  133. server. For consistency with other hash values, this value should be formatted as an uppercase
  134. hash.
  135. */
  136. static constexpr const char *kTlsServerHashMd5 = "tls.server.hash.md5";
  137. /**
  138. Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the
  139. server. For consistency with other hash values, this value should be formatted as an uppercase
  140. hash.
  141. */
  142. static constexpr const char *kTlsServerHashSha1 = "tls.server.hash.sha1";
  143. /**
  144. Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by
  145. the server. For consistency with other hash values, this value should be formatted as an uppercase
  146. hash.
  147. */
  148. static constexpr const char *kTlsServerHashSha256 = "tls.server.hash.sha256";
  149. /**
  150. Distinguished name of <a
  151. href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6">subject</a> of the issuer of
  152. the x.509 certificate presented by the client.
  153. */
  154. static constexpr const char *kTlsServerIssuer = "tls.server.issuer";
  155. /**
  156. A hash that identifies servers based on how they perform an SSL/TLS handshake.
  157. */
  158. static constexpr const char *kTlsServerJa3s = "tls.server.ja3s";
  159. /**
  160. Date/Time indicating when server certificate is no longer considered valid.
  161. */
  162. static constexpr const char *kTlsServerNotAfter = "tls.server.not_after";
  163. /**
  164. Date/Time indicating when server certificate is first considered valid.
  165. */
  166. static constexpr const char *kTlsServerNotBefore = "tls.server.not_before";
  167. /**
  168. Distinguished name of subject of the x.509 certificate presented by the server.
  169. */
  170. static constexpr const char *kTlsServerSubject = "tls.server.subject";
  171. namespace TlsProtocolNameValues
  172. {
  173. /**
  174. none
  175. */
  176. static constexpr const char *kSsl = "ssl";
  177. /**
  178. none
  179. */
  180. static constexpr const char *kTls = "tls";
  181. } // namespace TlsProtocolNameValues
  182. } // namespace tls
  183. } // namespace semconv
  184. OPENTELEMETRY_END_NAMESPACE