File: process_attributes.h

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (279 lines) | stat: -rw-r--r-- 9,567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

/*
 * DO NOT EDIT, this is an Auto-generated file from:
 * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
 */

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace process
{

/**
  Length of the process.command_args array
  <p>
  This field can be useful for querying or performing bucket analysis on how many arguments were
  provided to start a process. More arguments may be an indication of suspicious activity.
 */
static constexpr const char *kProcessArgsCount = "process.args_count";

/**
  The command used to launch the process (i.e. the command name). On Linux based systems, can be set
  to the zeroth string in @code proc/[pid]/cmdline @endcode. On Windows, can be set to the first
  parameter extracted from @code GetCommandLineW @endcode.
 */
static constexpr const char *kProcessCommand = "process.command";

/**
  All the command arguments (including the command/executable itself) as received by the process. On
  Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to
  the list of null-delimited strings extracted from @code proc/[pid]/cmdline @endcode. For
  libc-based executables, this would be the full argv vector passed to @code main @endcode. SHOULD
  NOT be collected by default unless there is sanitization that excludes sensitive data.
 */
static constexpr const char *kProcessCommandArgs = "process.command_args";

/**
  The full command used to launch the process as a single string representing the full command. On
  Windows, can be set to the result of @code GetCommandLineW @endcode. Do not set this if you have
  to assemble it just for monitoring; use @code process.command_args @endcode instead. SHOULD NOT be
  collected by default unless there is sanitization that excludes sensitive data.
 */
static constexpr const char *kProcessCommandLine = "process.command_line";

/**
  Specifies whether the context switches for this data point were voluntary or involuntary.
 */
static constexpr const char *kProcessContextSwitchType = "process.context_switch_type";

/**
  Deprecated, use @code cpu.mode @endcode instead.

  @deprecated
  {"note": "Replaced by @code cpu.mode @endcode.", "reason": "renamed", "renamed_to": "cpu.mode"}
 */
OPENTELEMETRY_DEPRECATED static constexpr const char *kProcessCpuState = "process.cpu.state";

/**
  The date and time the process was created, in ISO 8601 format.
 */
static constexpr const char *kProcessCreationTime = "process.creation.time";

/**
  Process environment variables, @code <key> @endcode being the environment variable name, the value
  being the environment variable value. <p> Examples: <ul> <li>an environment variable @code USER
  @endcode with value @code "ubuntu" @endcode SHOULD be recorded as the @code
  process.environment_variable.USER @endcode attribute with value @code "ubuntu" @endcode.</li>
    <li>an environment variable @code PATH @endcode with value @code "/usr/local/bin:/usr/bin"
  @endcode SHOULD be recorded as the @code process.environment_variable.PATH @endcode attribute with
  value @code "/usr/local/bin:/usr/bin" @endcode.</li>
  </ul>
 */
static constexpr const char *kProcessEnvironmentVariable = "process.environment_variable";

/**
  The GNU build ID as found in the @code .note.gnu.build-id @endcode ELF section (hex string).
 */
static constexpr const char *kProcessExecutableBuildIdGnu = "process.executable.build_id.gnu";

/**
  The Go build ID as retrieved by @code go tool buildid <go executable> @endcode.
 */
static constexpr const char *kProcessExecutableBuildIdGo = "process.executable.build_id.go";

/**
  Profiling specific build ID for executables. See the OTel specification for Profiles for more
  information.
 */
static constexpr const char *kProcessExecutableBuildIdHtlhash =
    "process.executable.build_id.htlhash";

/**
  "Deprecated, use @code process.executable.build_id.htlhash @endcode instead."

  @deprecated
  {"note": "Replaced by @code process.executable.build_id.htlhash @endcode.", "reason": "renamed",
  "renamed_to": "process.executable.build_id.htlhash"}
 */
OPENTELEMETRY_DEPRECATED static constexpr const char *kProcessExecutableBuildIdProfiling =
    "process.executable.build_id.profiling";

/**
  The name of the process executable. On Linux based systems, this SHOULD be set to the base name of
  the target of @code /proc/[pid]/exe @endcode. On Windows, this SHOULD be set to the base name of
  @code GetProcessImageFileNameW @endcode.
 */
static constexpr const char *kProcessExecutableName = "process.executable.name";

/**
  The full path to the process executable. On Linux based systems, can be set to the target of @code
  proc/[pid]/exe @endcode. On Windows, can be set to the result of @code GetProcessImageFileNameW
  @endcode.
 */
static constexpr const char *kProcessExecutablePath = "process.executable.path";

/**
  The exit code of the process.
 */
static constexpr const char *kProcessExitCode = "process.exit.code";

/**
  The date and time the process exited, in ISO 8601 format.
 */
static constexpr const char *kProcessExitTime = "process.exit.time";

/**
  The PID of the process's group leader. This is also the process group ID (PGID) of the process.
 */
static constexpr const char *kProcessGroupLeaderPid = "process.group_leader.pid";

/**
  Whether the process is connected to an interactive shell.
 */
static constexpr const char *kProcessInteractive = "process.interactive";

/**
  The control group associated with the process.
  <p>
  Control groups (cgroups) are a kernel feature used to organize and manage process resources. This
  attribute provides the path(s) to the cgroup(s) associated with the process, which should match
  the contents of the <a
  href="https://man7.org/linux/man-pages/man7/cgroups.7.html">/proc/[PID]/cgroup</a> file.
 */
static constexpr const char *kProcessLinuxCgroup = "process.linux.cgroup";

/**
  The username of the user that owns the process.
 */
static constexpr const char *kProcessOwner = "process.owner";

/**
  The type of page fault for this data point. Type @code major @endcode is for major/hard page
  faults, and @code minor @endcode is for minor/soft page faults.
 */
static constexpr const char *kProcessPagingFaultType = "process.paging.fault_type";

/**
  Parent Process identifier (PPID).
 */
static constexpr const char *kProcessParentPid = "process.parent_pid";

/**
  Process identifier (PID).
 */
static constexpr const char *kProcessPid = "process.pid";

/**
  The real user ID (RUID) of the process.
 */
static constexpr const char *kProcessRealUserId = "process.real_user.id";

/**
  The username of the real user of the process.
 */
static constexpr const char *kProcessRealUserName = "process.real_user.name";

/**
  An additional description about the runtime of the process, for example a specific vendor
  customization of the runtime environment.
 */
static constexpr const char *kProcessRuntimeDescription = "process.runtime.description";

/**
  The name of the runtime of this process.
 */
static constexpr const char *kProcessRuntimeName = "process.runtime.name";

/**
  The version of the runtime of this process, as returned by the runtime without modification.
 */
static constexpr const char *kProcessRuntimeVersion = "process.runtime.version";

/**
  The saved user ID (SUID) of the process.
 */
static constexpr const char *kProcessSavedUserId = "process.saved_user.id";

/**
  The username of the saved user.
 */
static constexpr const char *kProcessSavedUserName = "process.saved_user.name";

/**
  The PID of the process's session leader. This is also the session ID (SID) of the process.
 */
static constexpr const char *kProcessSessionLeaderPid = "process.session_leader.pid";

/**
  Process title (proctitle)
  <p>
  In many Unix-like systems, process title (proctitle), is the string that represents the name or
  command line of a running process, displayed by system monitoring tools like ps, top, and htop.
 */
static constexpr const char *kProcessTitle = "process.title";

/**
  The effective user ID (EUID) of the process.
 */
static constexpr const char *kProcessUserId = "process.user.id";

/**
  The username of the effective user of the process.
 */
static constexpr const char *kProcessUserName = "process.user.name";

/**
  Virtual process identifier.
  <p>
  The process ID within a PID namespace. This is not necessarily unique across all processes on the
  host but it is unique within the process namespace that the process exists within.
 */
static constexpr const char *kProcessVpid = "process.vpid";

/**
  The working directory of the process.
 */
static constexpr const char *kProcessWorkingDirectory = "process.working_directory";

namespace ProcessContextSwitchTypeValues
{

static constexpr const char *kVoluntary = "voluntary";

static constexpr const char *kInvoluntary = "involuntary";

}  // namespace ProcessContextSwitchTypeValues

namespace ProcessCpuStateValues
{

static constexpr const char *kSystem = "system";

static constexpr const char *kUser = "user";

static constexpr const char *kWait = "wait";

}  // namespace ProcessCpuStateValues

namespace ProcessPagingFaultTypeValues
{

static constexpr const char *kMajor = "major";

static constexpr const char *kMinor = "minor";

}  // namespace ProcessPagingFaultTypeValues

}  // namespace process
}  // namespace semconv
OPENTELEMETRY_END_NAMESPACE