-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathContainerIncubatingAttributes.java
More file actions
197 lines (170 loc) · 7.44 KB
/
ContainerIncubatingAttributes.java
File metadata and controls
197 lines (170 loc) · 7.44 KB
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
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.semconv.incubating;
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.semconv.AttributeKeyTemplate;
import java.util.List;
// DO NOT EDIT, this is an Auto-generated file from
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class ContainerIncubatingAttributes {
/**
* The command used to run the container (i.e. the command name).
*
* <p>Notes:
*
* <p>If using embedded credentials or sensitive data, it is recommended to remove them to prevent
* potential leakage.
*/
public static final AttributeKey<String> CONTAINER_COMMAND = stringKey("container.command");
/** All the command arguments (including the command/executable itself) run by the container. */
public static final AttributeKey<List<String>> CONTAINER_COMMAND_ARGS =
stringArrayKey("container.command_args");
/** The full command run by the container as a single string representing the full command. */
public static final AttributeKey<String> CONTAINER_COMMAND_LINE =
stringKey("container.command_line");
/**
* Deprecated, use {@code cpu.mode} instead.
*
* @deprecated Replaced by {@code cpu.mode}.
*/
@Deprecated
public static final AttributeKey<String> CONTAINER_CPU_STATE = stringKey("container.cpu.state");
/**
* The name of the CSI (<a href="https://github.com/container-storage-interface/spec">Container
* Storage Interface</a>) plugin used by the volume.
*
* <p>Notes:
*
* <p>This can sometimes be referred to as a "driver" in CSI implementations. This should
* represent the {@code name} field of the GetPluginInfo RPC.
*/
public static final AttributeKey<String> CONTAINER_CSI_PLUGIN_NAME =
stringKey("container.csi.plugin.name");
/**
* The unique volume ID returned by the CSI (<a
* href="https://github.com/container-storage-interface/spec">Container Storage Interface</a>)
* plugin.
*
* <p>Notes:
*
* <p>This can sometimes be referred to as a "volume handle" in CSI implementations. This should
* represent the {@code Volume.volume_id} field in CSI spec.
*/
public static final AttributeKey<String> CONTAINER_CSI_VOLUME_ID =
stringKey("container.csi.volume.id");
/**
* Container ID. Usually a UUID, as for example used to <a
* href="https://docs.docker.com/engine/containers/run/#container-identification">identify Docker
* containers</a>. The UUID might be abbreviated.
*/
public static final AttributeKey<String> CONTAINER_ID = stringKey("container.id");
/**
* Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
*
* <p>Notes:
*
* <p>Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the
* {@code Image} field from the Docker container inspect <a
* href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect">API</a>
* endpoint. K8s defines a link to the container registry repository with digest {@code "imageID":
* "registry.azurecr.io
* /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}.
* The ID is assigned by the container runtime and can vary in different environments. Consider
* using {@code oci.manifest.digest} if it is important to identify the same image in different
* environments/runtimes.
*/
public static final AttributeKey<String> CONTAINER_IMAGE_ID = stringKey("container.image.id");
/** Name of the image the container was built on. */
public static final AttributeKey<String> CONTAINER_IMAGE_NAME = stringKey("container.image.name");
/**
* Repo digests of the container image as provided by the container runtime.
*
* <p>Notes:
*
* <p><a
* href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker</a>
* and <a
* href="https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238">CRI</a>
* report those under the {@code RepoDigests} field.
*/
public static final AttributeKey<List<String>> CONTAINER_IMAGE_REPO_DIGESTS =
stringArrayKey("container.image.repo_digests");
/**
* Container image tags. An example can be found in <a
* href="https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect">Docker
* Image Inspect</a>. Should be only the {@code <tag>} section of the full name for example from
* {@code registry.example.com/my-org/my-image:<tag>}.
*/
public static final AttributeKey<List<String>> CONTAINER_IMAGE_TAGS =
stringArrayKey("container.image.tags");
/**
* Container labels, {@code <key>} being the label name, the value being the label value.
*
* <p>Notes:
*
* <p>For example, a docker container label {@code app} with value {@code nginx} SHOULD be
* recorded as the {@code container.label.app} attribute with value {@code "nginx"}.
*/
public static final AttributeKeyTemplate<String> CONTAINER_LABEL =
stringKeyTemplate("container.label");
/**
* Deprecated, use {@code container.label} instead.
*
* @deprecated Replaced by {@code container.label}.
*/
@Deprecated
public static final AttributeKeyTemplate<String> CONTAINER_LABELS =
stringKeyTemplate("container.labels");
/** Container name used by container runtime. */
public static final AttributeKey<String> CONTAINER_NAME = stringKey("container.name");
/**
* The container runtime managing this container.
*
* @deprecated Replaced by {@code container.runtime.name}.
*/
@Deprecated
public static final AttributeKey<String> CONTAINER_RUNTIME = stringKey("container.runtime");
/**
* A description about the runtime which could include, for example details about the CRI/API
* version being used or other customisations.
*/
public static final AttributeKey<String> CONTAINER_RUNTIME_DESCRIPTION =
stringKey("container.runtime.description");
/** The container runtime managing this container. */
public static final AttributeKey<String> CONTAINER_RUNTIME_NAME =
stringKey("container.runtime.name");
/**
* The version of the runtime of this process, as returned by the runtime without modification.
*/
public static final AttributeKey<String> CONTAINER_RUNTIME_VERSION =
stringKey("container.runtime.version");
// Enum definitions
/**
* Values for {@link #CONTAINER_CPU_STATE}
*
* @deprecated Replaced by {@code cpu.mode}.
*/
@Deprecated
public static final class ContainerCpuStateIncubatingValues {
/**
* When tasks of the cgroup are in user mode (Linux). When all container processes are in user
* mode (Windows).
*/
public static final String USER = "user";
/** When CPU is used by the system (host OS) */
public static final String SYSTEM = "system";
/**
* When tasks of the cgroup are in kernel mode (Linux). When all container processes are in
* kernel mode (Windows).
*/
public static final String KERNEL = "kernel";
private ContainerCpuStateIncubatingValues() {}
}
private ContainerIncubatingAttributes() {}
}