vcs_attributes.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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 vcs
  16. {
  17. /**
  18. The ID of the change (pull request/merge request/changelist) if applicable. This is usually a
  19. unique (within repository) identifier generated by the VCS system.
  20. */
  21. static constexpr const char *kVcsChangeId = "vcs.change.id";
  22. /**
  23. The state of the change (pull request/merge request/changelist).
  24. */
  25. static constexpr const char *kVcsChangeState = "vcs.change.state";
  26. /**
  27. The human readable title of the change (pull request/merge request/changelist). This title is
  28. often a brief summary of the change and may get merged in to a ref as the commit summary.
  29. */
  30. static constexpr const char *kVcsChangeTitle = "vcs.change.title";
  31. /**
  32. The type of line change being measured on a branch or change.
  33. */
  34. static constexpr const char *kVcsLineChangeType = "vcs.line_change.type";
  35. /**
  36. The group owner within the version control system.
  37. */
  38. static constexpr const char *kVcsOwnerName = "vcs.owner.name";
  39. /**
  40. The name of the version control system provider.
  41. */
  42. static constexpr const char *kVcsProviderName = "vcs.provider.name";
  43. /**
  44. The name of the <a href="https://git-scm.com/docs/gitglossary#def_ref">reference</a> such as
  45. <strong>branch</strong> or <strong>tag</strong> in the repository. <p>
  46. @code base @endcode refers to the starting point of a change. For example, @code main @endcode
  47. would be the base reference of type branch if you've created a new
  48. reference of type branch from it and created new commits.
  49. */
  50. static constexpr const char *kVcsRefBaseName = "vcs.ref.base.name";
  51. /**
  52. The revision, literally <a href="https://www.merriam-webster.com/dictionary/revision">revised
  53. version</a>, The revision most often refers to a commit object in Git, or a revision number in
  54. SVN. <p>
  55. @code base @endcode refers to the starting point of a change. For example, @code main @endcode
  56. would be the base reference of type branch if you've created a new
  57. reference of type branch from it and created new commits. The
  58. revision can be a full <a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf">hash
  59. value (see glossary)</a>, of the recorded change to a ref within a repository pointing to a commit
  60. <a href="https://git-scm.com/docs/git-commit">commit</a> object. It does not necessarily have to
  61. be a hash; it can simply define a <a
  62. href="https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html">revision number</a> which
  63. is an integer that is monotonically increasing. In cases where it is identical to the @code
  64. ref.base.name @endcode, it SHOULD still be included. It is up to the implementer to decide which
  65. value to set as the revision based on the VCS system and situational context.
  66. */
  67. static constexpr const char *kVcsRefBaseRevision = "vcs.ref.base.revision";
  68. /**
  69. The type of the <a href="https://git-scm.com/docs/gitglossary#def_ref">reference</a> in the
  70. repository. <p>
  71. @code base @endcode refers to the starting point of a change. For example, @code main @endcode
  72. would be the base reference of type branch if you've created a new
  73. reference of type branch from it and created new commits.
  74. */
  75. static constexpr const char *kVcsRefBaseType = "vcs.ref.base.type";
  76. /**
  77. The name of the <a href="https://git-scm.com/docs/gitglossary#def_ref">reference</a> such as
  78. <strong>branch</strong> or <strong>tag</strong> in the repository. <p>
  79. @code head @endcode refers to where you are right now; the current reference at a
  80. given time.
  81. */
  82. static constexpr const char *kVcsRefHeadName = "vcs.ref.head.name";
  83. /**
  84. The revision, literally <a href="https://www.merriam-webster.com/dictionary/revision">revised
  85. version</a>, The revision most often refers to a commit object in Git, or a revision number in
  86. SVN. <p>
  87. @code head @endcode refers to where you are right now; the current reference at a
  88. given time.The revision can be a full <a
  89. href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf">hash value (see glossary)</a>,
  90. of the recorded change to a ref within a repository pointing to a
  91. commit <a href="https://git-scm.com/docs/git-commit">commit</a> object. It does
  92. not necessarily have to be a hash; it can simply define a <a
  93. href="https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html">revision number</a> which
  94. is an integer that is monotonically increasing. In cases where it is identical to the @code
  95. ref.head.name @endcode, it SHOULD still be included. It is up to the implementer to decide which
  96. value to set as the revision based on the VCS system and situational context.
  97. */
  98. static constexpr const char *kVcsRefHeadRevision = "vcs.ref.head.revision";
  99. /**
  100. The type of the <a href="https://git-scm.com/docs/gitglossary#def_ref">reference</a> in the
  101. repository. <p>
  102. @code head @endcode refers to where you are right now; the current reference at a
  103. given time.
  104. */
  105. static constexpr const char *kVcsRefHeadType = "vcs.ref.head.type";
  106. /**
  107. The type of the <a href="https://git-scm.com/docs/gitglossary#def_ref">reference</a> in the
  108. repository.
  109. */
  110. static constexpr const char *kVcsRefType = "vcs.ref.type";
  111. /**
  112. Deprecated, use @code vcs.change.id @endcode instead.
  113. @deprecated
  114. {"note": "Replaced by @code vcs.change.id @endcode.", "reason": "renamed", "renamed_to":
  115. "vcs.change.id"}
  116. */
  117. OPENTELEMETRY_DEPRECATED static constexpr const char *kVcsRepositoryChangeId =
  118. "vcs.repository.change.id";
  119. /**
  120. Deprecated, use @code vcs.change.title @endcode instead.
  121. @deprecated
  122. {"note": "Replaced by @code vcs.change.title @endcode.", "reason": "renamed", "renamed_to":
  123. "vcs.change.title"}
  124. */
  125. OPENTELEMETRY_DEPRECATED static constexpr const char *kVcsRepositoryChangeTitle =
  126. "vcs.repository.change.title";
  127. /**
  128. The human readable name of the repository. It SHOULD NOT include any additional identifier like
  129. Group/SubGroup in GitLab or organization in GitHub. <p> Due to it only being the name, it can
  130. clash with forks of the same repository if collecting telemetry across multiple orgs or groups in
  131. the same backends.
  132. */
  133. static constexpr const char *kVcsRepositoryName = "vcs.repository.name";
  134. /**
  135. Deprecated, use @code vcs.ref.head.name @endcode instead.
  136. @deprecated
  137. {"note": "Replaced by @code vcs.ref.head.name @endcode.", "reason": "renamed", "renamed_to":
  138. "vcs.ref.head.name"}
  139. */
  140. OPENTELEMETRY_DEPRECATED static constexpr const char *kVcsRepositoryRefName =
  141. "vcs.repository.ref.name";
  142. /**
  143. Deprecated, use @code vcs.ref.head.revision @endcode instead.
  144. @deprecated
  145. {"note": "Replaced by @code vcs.ref.head.revision @endcode.", "reason": "renamed", "renamed_to":
  146. "vcs.ref.head.revision"}
  147. */
  148. OPENTELEMETRY_DEPRECATED static constexpr const char *kVcsRepositoryRefRevision =
  149. "vcs.repository.ref.revision";
  150. /**
  151. Deprecated, use @code vcs.ref.head.type @endcode instead.
  152. @deprecated
  153. {"note": "Replaced by @code vcs.ref.head.type @endcode.", "reason": "renamed", "renamed_to":
  154. "vcs.ref.head.type"}
  155. */
  156. OPENTELEMETRY_DEPRECATED static constexpr const char *kVcsRepositoryRefType =
  157. "vcs.repository.ref.type";
  158. /**
  159. The <a
  160. href="https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.">canonical
  161. URL</a> of the repository providing the complete HTTP(S) address in order to locate and identify
  162. the repository through a browser. <p> In Git Version Control Systems, the canonical URL SHOULD NOT
  163. include the @code .git @endcode extension.
  164. */
  165. static constexpr const char *kVcsRepositoryUrlFull = "vcs.repository.url.full";
  166. /**
  167. The type of revision comparison.
  168. */
  169. static constexpr const char *kVcsRevisionDeltaDirection = "vcs.revision_delta.direction";
  170. namespace VcsChangeStateValues
  171. {
  172. /**
  173. Open means the change is currently active and under review. It hasn't been merged into the target
  174. branch yet, and it's still possible to make changes or add comments.
  175. */
  176. static constexpr const char *kOpen = "open";
  177. /**
  178. WIP (work-in-progress, draft) means the change is still in progress and not yet ready for a full
  179. review. It might still undergo significant changes.
  180. */
  181. static constexpr const char *kWip = "wip";
  182. /**
  183. Closed means the merge request has been closed without merging. This can happen for various
  184. reasons, such as the changes being deemed unnecessary, the issue being resolved in another way, or
  185. the author deciding to withdraw the request.
  186. */
  187. static constexpr const char *kClosed = "closed";
  188. /**
  189. Merged indicates that the change has been successfully integrated into the target codebase.
  190. */
  191. static constexpr const char *kMerged = "merged";
  192. } // namespace VcsChangeStateValues
  193. namespace VcsLineChangeTypeValues
  194. {
  195. /**
  196. How many lines were added.
  197. */
  198. static constexpr const char *kAdded = "added";
  199. /**
  200. How many lines were removed.
  201. */
  202. static constexpr const char *kRemoved = "removed";
  203. } // namespace VcsLineChangeTypeValues
  204. namespace VcsProviderNameValues
  205. {
  206. /**
  207. <a href="https://github.com">GitHub</a>
  208. */
  209. static constexpr const char *kGithub = "github";
  210. /**
  211. <a href="https://gitlab.com">GitLab</a>
  212. */
  213. static constexpr const char *kGitlab = "gitlab";
  214. /**
  215. Deprecated, use @code gitea @endcode instead.
  216. */
  217. static constexpr const char *kGittea = "gittea";
  218. /**
  219. <a href="https://gitea.io">Gitea</a>
  220. */
  221. static constexpr const char *kGitea = "gitea";
  222. /**
  223. <a href="https://bitbucket.org">Bitbucket</a>
  224. */
  225. static constexpr const char *kBitbucket = "bitbucket";
  226. } // namespace VcsProviderNameValues
  227. namespace VcsRefBaseTypeValues
  228. {
  229. /**
  230. <a
  231. href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch">branch</a>
  232. */
  233. static constexpr const char *kBranch = "branch";
  234. /**
  235. <a href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag">tag</a>
  236. */
  237. static constexpr const char *kTag = "tag";
  238. } // namespace VcsRefBaseTypeValues
  239. namespace VcsRefHeadTypeValues
  240. {
  241. /**
  242. <a
  243. href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch">branch</a>
  244. */
  245. static constexpr const char *kBranch = "branch";
  246. /**
  247. <a href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag">tag</a>
  248. */
  249. static constexpr const char *kTag = "tag";
  250. } // namespace VcsRefHeadTypeValues
  251. namespace VcsRefTypeValues
  252. {
  253. /**
  254. <a
  255. href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch">branch</a>
  256. */
  257. static constexpr const char *kBranch = "branch";
  258. /**
  259. <a href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag">tag</a>
  260. */
  261. static constexpr const char *kTag = "tag";
  262. } // namespace VcsRefTypeValues
  263. namespace VcsRepositoryRefTypeValues
  264. {
  265. /**
  266. <a
  267. href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch">branch</a>
  268. */
  269. static constexpr const char *kBranch = "branch";
  270. /**
  271. <a href="https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag">tag</a>
  272. */
  273. static constexpr const char *kTag = "tag";
  274. } // namespace VcsRepositoryRefTypeValues
  275. namespace VcsRevisionDeltaDirectionValues
  276. {
  277. /**
  278. How many revisions the change is behind the target ref.
  279. */
  280. static constexpr const char *kBehind = "behind";
  281. /**
  282. How many revisions the change is ahead of the target ref.
  283. */
  284. static constexpr const char *kAhead = "ahead";
  285. } // namespace VcsRevisionDeltaDirectionValues
  286. } // namespace vcs
  287. } // namespace semconv
  288. OPENTELEMETRY_END_NAMESPACE