forked from open-telemetry/opentelemetry-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.ts
139 lines (109 loc) · 4.07 KB
/
constants.ts
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
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const CLOUD_RESOURCE = {
/** Name of the cloud provider. Example values are aws, azure, gcp. */
PROVIDER: 'cloud.provider',
/** The cloud account id used to identify different entities. */
ACCOUNT_ID: 'cloud.account.id',
/** A specific geographical location where different entities can run. */
REGION: 'cloud.region',
/** Zones are a sub set of the region connected through low-latency links. */
ZONE: 'cloud.zone',
};
/**
* Attributes defining a compute unit (e.g. Container, Process, Lambda
* Function).
* */
export const CONTAINER_RESOURCE = {
/** The container name. */
NAME: 'container.name',
/** The name of the image the container was built on. */
IMAGE_NAME: 'container.image.name',
/** The container image tag. */
IMAGE_TAG: 'container.image.tag',
};
/** Attributes defining a computing instance (e.g. host). */
export const HOST_RESOURCE = {
/**
* Hostname of the host. It contains what the hostname command returns on the
* host machine.
*/
HOSTNAME: 'host.hostname',
/**
* Unique host id. For Cloud this must be the instance_id assigned by the
* cloud provider
*/
ID: 'host.id',
/**
* Name of the host. It may contain what hostname returns on Unix systems,
* the fully qualified, or a name specified by the user.
*/
NAME: 'host.name',
/** Type of host. For Cloud this must be the machine type.*/
TYPE: 'host.type',
/** Name of the VM image or OS install the host was instantiated from. */
IMAGE_NAME: 'host.image.name',
/** VM image id. For Cloud, this value is from the provider. */
IMAGE_ID: 'host.image.id',
/** The version string of the VM image */
IMAGE_VERSION: 'host.image.version',
};
/** Attributes defining a deployment service (e.g. Kubernetes). */
export const K8S_RESOURCE = {
/** The name of the cluster that the pod is running in. */
CLUSTER_NAME: 'k8s.cluster.name',
/** The name of the namespace that the pod is running in. */
NAMESPACE_NAME: 'k8s.namespace.name',
/** The name of the pod. */
POD_NAME: 'k8s.pod.name',
/** The name of the deployment. */
DEPLOYMENT_NAME: 'k8s.deployment.name',
};
/** Attributes describing the telemetry library. */
export const TELEMETRY_SDK_RESOURCE = {
/** The name of the telemetry library. */
NAME: 'telemetry.sdk.name',
/** The language of telemetry library and of the code instrumented with it. */
LANGUAGE: 'telemetry.sdk.language',
/** The version string of the telemetry library */
VERSION: 'telemetry.sdk.version',
};
/** Attributes describing a service instance. */
export const SERVICE_RESOURCE = {
/** Logical name of the service. */
NAME: 'service.name',
/** A namespace for `service.name`. */
NAMESPACE: 'service.namespace',
/** The string ID of the service instance. */
INSTANCE_ID: 'service.instance.id',
/** The version string of the service API or implementation. */
VERSION: 'service.version',
};
/** Attributes describing a Process. */
export const PROCESS_RESOURCE = {
/** A command which launced this proces. */
COMMAND: 'process.command',
/** The full command with arguments as string. */
COMMAND_LINE: 'process.command_line',
/** A name given to currently running porcess defaults to executable (process.title) . */
NAME: 'process.executable.name',
/** An owner of currently running process. */
OWNER: 'process.owner',
/** The full path to the process executable. */
PATH: 'process.executable.path',
/** Process identifier of currently running process. */
PID: 'process.id',
};