process_attributes.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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 process
  16. {
  17. /**
  18. Length of the process.command_args array
  19. <p>
  20. This field can be useful for querying or performing bucket analysis on how many arguments were
  21. provided to start a process. More arguments may be an indication of suspicious activity.
  22. */
  23. static constexpr const char *kProcessArgsCount = "process.args_count";
  24. /**
  25. The command used to launch the process (i.e. the command name). On Linux based systems, can be set
  26. to the zeroth string in @code proc/[pid]/cmdline @endcode. On Windows, can be set to the first
  27. parameter extracted from @code GetCommandLineW @endcode.
  28. */
  29. static constexpr const char *kProcessCommand = "process.command";
  30. /**
  31. All the command arguments (including the command/executable itself) as received by the process. On
  32. Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to
  33. the list of null-delimited strings extracted from @code proc/[pid]/cmdline @endcode. For
  34. libc-based executables, this would be the full argv vector passed to @code main @endcode. SHOULD
  35. NOT be collected by default unless there is sanitization that excludes sensitive data.
  36. */
  37. static constexpr const char *kProcessCommandArgs = "process.command_args";
  38. /**
  39. The full command used to launch the process as a single string representing the full command. On
  40. Windows, can be set to the result of @code GetCommandLineW @endcode. Do not set this if you have
  41. to assemble it just for monitoring; use @code process.command_args @endcode instead. SHOULD NOT be
  42. collected by default unless there is sanitization that excludes sensitive data.
  43. */
  44. static constexpr const char *kProcessCommandLine = "process.command_line";
  45. /**
  46. Specifies whether the context switches for this data point were voluntary or involuntary.
  47. */
  48. static constexpr const char *kProcessContextSwitchType = "process.context_switch_type";
  49. /**
  50. Deprecated, use @code cpu.mode @endcode instead.
  51. @deprecated
  52. {"note": "Replaced by @code cpu.mode @endcode.", "reason": "renamed", "renamed_to": "cpu.mode"}
  53. */
  54. OPENTELEMETRY_DEPRECATED static constexpr const char *kProcessCpuState = "process.cpu.state";
  55. /**
  56. The date and time the process was created, in ISO 8601 format.
  57. */
  58. static constexpr const char *kProcessCreationTime = "process.creation.time";
  59. /**
  60. Process environment variables, <key> being the environment variable name, the value being the
  61. environment variable value. <p> Examples: <ul> <li>an environment variable @code USER @endcode
  62. with value @code "ubuntu" @endcode SHOULD be recorded as the @code
  63. process.environment_variable.USER @endcode attribute with value @code "ubuntu" @endcode.</li>
  64. <li>an environment variable @code PATH @endcode with value @code "/usr/local/bin:/usr/bin"
  65. @endcode SHOULD be recorded as the @code process.environment_variable.PATH @endcode attribute with
  66. value @code "/usr/local/bin:/usr/bin" @endcode.</li>
  67. </ul>
  68. */
  69. static constexpr const char *kProcessEnvironmentVariable = "process.environment_variable";
  70. /**
  71. The GNU build ID as found in the @code .note.gnu.build-id @endcode ELF section (hex string).
  72. */
  73. static constexpr const char *kProcessExecutableBuildIdGnu = "process.executable.build_id.gnu";
  74. /**
  75. The Go build ID as retrieved by @code go tool buildid <go executable> @endcode.
  76. */
  77. static constexpr const char *kProcessExecutableBuildIdGo = "process.executable.build_id.go";
  78. /**
  79. Profiling specific build ID for executables. See the OTel specification for Profiles for more
  80. information.
  81. */
  82. static constexpr const char *kProcessExecutableBuildIdHtlhash =
  83. "process.executable.build_id.htlhash";
  84. /**
  85. "Deprecated, use @code process.executable.build_id.htlhash @endcode instead."
  86. @deprecated
  87. {"note": "Replaced by @code process.executable.build_id.htlhash @endcode.", "reason": "renamed",
  88. "renamed_to": "process.executable.build_id.htlhash"}
  89. */
  90. OPENTELEMETRY_DEPRECATED static constexpr const char *kProcessExecutableBuildIdProfiling =
  91. "process.executable.build_id.profiling";
  92. /**
  93. The name of the process executable. On Linux based systems, this SHOULD be set to the base name of
  94. the target of @code /proc/[pid]/exe @endcode. On Windows, this SHOULD be set to the base name of
  95. @code GetProcessImageFileNameW @endcode.
  96. */
  97. static constexpr const char *kProcessExecutableName = "process.executable.name";
  98. /**
  99. The full path to the process executable. On Linux based systems, can be set to the target of @code
  100. proc/[pid]/exe @endcode. On Windows, can be set to the result of @code GetProcessImageFileNameW
  101. @endcode.
  102. */
  103. static constexpr const char *kProcessExecutablePath = "process.executable.path";
  104. /**
  105. The exit code of the process.
  106. */
  107. static constexpr const char *kProcessExitCode = "process.exit.code";
  108. /**
  109. The date and time the process exited, in ISO 8601 format.
  110. */
  111. static constexpr const char *kProcessExitTime = "process.exit.time";
  112. /**
  113. The PID of the process's group leader. This is also the process group ID (PGID) of the process.
  114. */
  115. static constexpr const char *kProcessGroupLeaderPid = "process.group_leader.pid";
  116. /**
  117. Whether the process is connected to an interactive shell.
  118. */
  119. static constexpr const char *kProcessInteractive = "process.interactive";
  120. /**
  121. The control group associated with the process.
  122. <p>
  123. Control groups (cgroups) are a kernel feature used to organize and manage process resources. This
  124. attribute provides the path(s) to the cgroup(s) associated with the process, which should match
  125. the contents of the <a
  126. href="https://man7.org/linux/man-pages/man7/cgroups.7.html">/proc/[PID]/cgroup</a> file.
  127. */
  128. static constexpr const char *kProcessLinuxCgroup = "process.linux.cgroup";
  129. /**
  130. The username of the user that owns the process.
  131. */
  132. static constexpr const char *kProcessOwner = "process.owner";
  133. /**
  134. The type of page fault for this data point. Type @code major @endcode is for major/hard page
  135. faults, and @code minor @endcode is for minor/soft page faults.
  136. */
  137. static constexpr const char *kProcessPagingFaultType = "process.paging.fault_type";
  138. /**
  139. Parent Process identifier (PPID).
  140. */
  141. static constexpr const char *kProcessParentPid = "process.parent_pid";
  142. /**
  143. Process identifier (PID).
  144. */
  145. static constexpr const char *kProcessPid = "process.pid";
  146. /**
  147. The real user ID (RUID) of the process.
  148. */
  149. static constexpr const char *kProcessRealUserId = "process.real_user.id";
  150. /**
  151. The username of the real user of the process.
  152. */
  153. static constexpr const char *kProcessRealUserName = "process.real_user.name";
  154. /**
  155. An additional description about the runtime of the process, for example a specific vendor
  156. customization of the runtime environment.
  157. */
  158. static constexpr const char *kProcessRuntimeDescription = "process.runtime.description";
  159. /**
  160. The name of the runtime of this process.
  161. */
  162. static constexpr const char *kProcessRuntimeName = "process.runtime.name";
  163. /**
  164. The version of the runtime of this process, as returned by the runtime without modification.
  165. */
  166. static constexpr const char *kProcessRuntimeVersion = "process.runtime.version";
  167. /**
  168. The saved user ID (SUID) of the process.
  169. */
  170. static constexpr const char *kProcessSavedUserId = "process.saved_user.id";
  171. /**
  172. The username of the saved user.
  173. */
  174. static constexpr const char *kProcessSavedUserName = "process.saved_user.name";
  175. /**
  176. The PID of the process's session leader. This is also the session ID (SID) of the process.
  177. */
  178. static constexpr const char *kProcessSessionLeaderPid = "process.session_leader.pid";
  179. /**
  180. Process title (proctitle)
  181. <p>
  182. In many Unix-like systems, process title (proctitle), is the string that represents the name or
  183. command line of a running process, displayed by system monitoring tools like ps, top, and htop.
  184. */
  185. static constexpr const char *kProcessTitle = "process.title";
  186. /**
  187. The effective user ID (EUID) of the process.
  188. */
  189. static constexpr const char *kProcessUserId = "process.user.id";
  190. /**
  191. The username of the effective user of the process.
  192. */
  193. static constexpr const char *kProcessUserName = "process.user.name";
  194. /**
  195. Virtual process identifier.
  196. <p>
  197. The process ID within a PID namespace. This is not necessarily unique across all processes on the
  198. host but it is unique within the process namespace that the process exists within.
  199. */
  200. static constexpr const char *kProcessVpid = "process.vpid";
  201. /**
  202. The working directory of the process.
  203. */
  204. static constexpr const char *kProcessWorkingDirectory = "process.working_directory";
  205. namespace ProcessContextSwitchTypeValues
  206. {
  207. /**
  208. none
  209. */
  210. static constexpr const char *kVoluntary = "voluntary";
  211. /**
  212. none
  213. */
  214. static constexpr const char *kInvoluntary = "involuntary";
  215. } // namespace ProcessContextSwitchTypeValues
  216. namespace ProcessCpuStateValues
  217. {
  218. /**
  219. none
  220. */
  221. static constexpr const char *kSystem = "system";
  222. /**
  223. none
  224. */
  225. static constexpr const char *kUser = "user";
  226. /**
  227. none
  228. */
  229. static constexpr const char *kWait = "wait";
  230. } // namespace ProcessCpuStateValues
  231. namespace ProcessPagingFaultTypeValues
  232. {
  233. /**
  234. none
  235. */
  236. static constexpr const char *kMajor = "major";
  237. /**
  238. none
  239. */
  240. static constexpr const char *kMinor = "minor";
  241. } // namespace ProcessPagingFaultTypeValues
  242. } // namespace process
  243. } // namespace semconv
  244. OPENTELEMETRY_END_NAMESPACE