Module resource
Expand description
§Resource Semantic Conventions
The resource semantic conventions define a set of standardized attributes
to be used in Resources.
§Usage
use opentelemetry::KeyValue;
use opentelemetry_sdk::{trace::SdkTracerProvider, Resource};
use opentelemetry_semantic_conventions as semconv;
let _tracer = SdkTracerProvider::builder()
.with_resource(Resource::builder_empty().with_service_name("my-service").build())
.build();Constants§
- ANDROID_
OS_ API_ LEVEL - Uniquely identifies the framework API revision offered by a version (
os.version) of the android operating system. More information can be found here. - APP_
INSTALLATION_ ID - A unique identifier representing the installation of an application on a specific device
- AWS_
ECS_ CLUSTER_ ARN - The ARN of an ECS cluster.
- AWS_
ECS_ CONTAINER_ ARN - The Amazon Resource Name (ARN) of an ECS container instance.
- AWS_
ECS_ LAUNCHTYPE - The launch type for an ECS task.
- AWS_
ECS_ TASK_ ARN - The ARN of a running ECS task.
- AWS_
ECS_ TASK_ FAMILY - The family name of the ECS task definition used to create the ECS task.
- AWS_
ECS_ TASK_ ID - The ID of a running ECS task. The ID MUST be extracted from
task.arn. - AWS_
ECS_ TASK_ REVISION - The revision for the task definition used to create the ECS task.
- AWS_
EKS_ CLUSTER_ ARN - The ARN of an EKS cluster.
- AWS_
LOG_ GROUP_ ARNS - The Amazon Resource Name(s) (ARN) of the AWS log group(s).
- AWS_
LOG_ GROUP_ NAMES - The name(s) of the AWS log group(s) an application is writing to.
- AWS_
LOG_ STREAM_ ARNS - The ARN(s) of the AWS log stream(s).
- AWS_
LOG_ STREAM_ NAMES - The name(s) of the AWS log stream(s) an application is writing to.
- BROWSER_
BRANDS - Array of brand name and version separated by a space
- BROWSER_
LANGUAGE - Preferred language of the user using the browser
- BROWSER_
MOBILE - A boolean that is true if the browser is running on a mobile device
- BROWSER_
PLATFORM - The platform on which the browser is running
- CICD_
PIPELINE_ NAME - The human readable name of the pipeline within a CI/CD system.
- CICD_
PIPELINE_ RUN_ ID - The unique identifier of a pipeline run within a CI/CD system.
- CICD_
PIPELINE_ RUN_ URL_ FULL - The URL of the pipeline run, providing the complete address in order to locate and identify the pipeline run.
- CICD_
WORKER_ ID - The unique identifier of a worker within a CICD system.
- CICD_
WORKER_ NAME - The name of a worker within a CICD system.
- CICD_
WORKER_ URL_ FULL - The URL of the worker, providing the complete address in order to locate and identify the worker.
- CLOUDFOUNDRY_
APP_ ID - The guid of the application.
- CLOUDFOUNDRY_
APP_ NAME - The name of the application.
- CLOUDFOUNDRY_
ORG_ ID - The guid of the CloudFoundry org the application is running in.
- CLOUDFOUNDRY_
ORG_ NAME - The name of the CloudFoundry organization the app is running in.
- CLOUDFOUNDRY_
PROCESS_ ID - The UID identifying the process.
- CLOUDFOUNDRY_
PROCESS_ TYPE - The type of process.
- CLOUDFOUNDRY_
SPACE_ ID - The guid of the CloudFoundry space the application is running in.
- CLOUDFOUNDRY_
SPACE_ NAME - The name of the CloudFoundry space the application is running in.
- CLOUDFOUNDRY_
SYSTEM_ ID - A guid or another name describing the event source.
- CLOUDFOUNDRY_
SYSTEM_ INSTANCE_ ID - A guid describing the concrete instance of the event source.
- CLOUD_
ACCOUNT_ ID - The cloud account ID the resource is assigned to.
- CLOUD_
AVAILABILITY_ ZONE - Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
- CLOUD_
PLATFORM - The cloud platform in use.
- CLOUD_
PROVIDER - Name of the cloud provider.
- CLOUD_
REGION - The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.
- CLOUD_
RESOURCE_ ID - Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on GCP)
- CONTAINER_
COMMAND - The command used to run the container (i.e. the command name).
- CONTAINER_
COMMAND_ ARGS - All the command arguments (including the command/executable itself) run by the container.
- CONTAINER_
COMMAND_ LINE - The full command run by the container as a single string representing the full command.
- CONTAINER_
ID - Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
- CONTAINER_
IMAGE_ ID - Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
- CONTAINER_
IMAGE_ NAME - Name of the image the container was built on.
- CONTAINER_
IMAGE_ REPO_ DIGESTS - Repo digests of the container image as provided by the container runtime.
- CONTAINER_
IMAGE_ TAGS - Container image tags. An example can be found in Docker Image Inspect. Should be only the
<tag>section of the full name for example fromregistry.example.com/my-org/my-image:<tag>. - CONTAINER_
LABEL - Container labels,
keybeing the label name, the value being the label value. - CONTAINER_
NAME - Container name used by container runtime.
- CONTAINER_
RUNTIME - The container runtime managing this container.
- DEPLOYMENT_
ENVIRONMENT_ NAME - Name of the deployment environment (aka deployment tier).
- DEVICE_
ID - A unique identifier representing the device
- DEVICE_
MANUFACTURER - The name of the device manufacturer
- DEVICE_
MODEL_ IDENTIFIER - The model identifier for the device
- DEVICE_
MODEL_ NAME - The marketing name for the device model
- FAAS_
INSTANCE - The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.
- FAAS_
MAX_ MEMORY - The amount of memory available to the serverless function converted to Bytes.
- FAAS_
NAME - The name of the single function that this runtime instance executes.
- FAAS_
VERSION - The immutable version of the function being executed.
- GCP_
APPHUB_ APPLICATION_ CONTAINER - The container within GCP where the AppHub application is defined.
- GCP_
APPHUB_ APPLICATION_ ID - The name of the application as configured in AppHub.
- GCP_
APPHUB_ APPLICATION_ LOCATION - The GCP zone or region where the application is defined.
- GCP_
APPHUB_ SERVICE_ CRITICALITY_ TYPE - Criticality of a service indicates its importance to the business.
- GCP_
APPHUB_ SERVICE_ ENVIRONMENT_ TYPE - Environment of a service is the stage of a software lifecycle.
- GCP_
APPHUB_ SERVICE_ ID - The name of the service as configured in AppHub.
- GCP_
APPHUB_ WORKLOAD_ CRITICALITY_ TYPE - Criticality of a workload indicates its importance to the business.
- GCP_
APPHUB_ WORKLOAD_ ENVIRONMENT_ TYPE - Environment of a workload is the stage of a software lifecycle.
- GCP_
APPHUB_ WORKLOAD_ ID - The name of the workload as configured in AppHub.
- GCP_
CLOUD_ RUN_ JOB_ EXECUTION - The name of the Cloud Run execution being run for the Job, as set by the
CLOUD_RUN_EXECUTIONenvironment variable. - GCP_
CLOUD_ RUN_ JOB_ TASK_ INDEX - The index for a task within an execution as provided by the
CLOUD_RUN_TASK_INDEXenvironment variable. - GCP_
GCE_ INSTANCE_ HOSTNAME - The hostname of a GCE instance. This is the full value of the default or custom hostname.
- GCP_
GCE_ INSTANCE_ NAME - The instance name of a GCE instance. This is the value provided by
host.name, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the default internal DNS name. - HEROKU_
APP_ ID - Unique identifier for the application
- HEROKU_
RELEASE_ COMMIT - Commit hash for the current release
- HEROKU_
RELEASE_ CREATION_ TIMESTAMP - Time and date the release was created
- HOST_
ARCH - The CPU architecture the host system is running on.
- HOST_
CPU_ CACHE_ L2_ SIZE - The amount of level 2 memory cache available to the processor (in Bytes).
- HOST_
CPU_ FAMILY - Family or generation of the CPU.
- HOST_
CPU_ MODEL_ ID - Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.
- HOST_
CPU_ MODEL_ NAME - Model designation of the processor.
- HOST_
CPU_ STEPPING - Stepping or core revisions.
- HOST_
CPU_ VENDOR_ ID - Processor manufacturer identifier. A maximum 12-character string.
- HOST_ID
- Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the
machine-id. See the table below for the sources to use to determine themachine-idbased on operating system. - HOST_
IMAGE_ ID - VM image ID or host OS image ID. For Cloud, this value is from the provider.
- HOST_
IMAGE_ NAME - Name of the VM image or OS install the host was instantiated from.
- HOST_
IMAGE_ VERSION - The version string of the VM image or host OS as defined in Version Attributes.
- HOST_IP
- Available IP addresses of the host, excluding loopback interfaces.
- HOST_
MAC - Available MAC addresses of the host, excluding loopback interfaces.
- HOST_
NAME - Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.
- HOST_
TYPE - Type of host. For Cloud, this must be the machine type.
- K8S_
CLUSTER_ NAME - The name of the cluster.
- K8S_
CLUSTER_ UID - A pseudo-ID for the cluster, set to the UID of the
kube-systemnamespace. - K8S_
CONTAINER_ NAME - The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (
container.name). - K8S_
CONTAINER_ RESTART_ COUNT - Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.
- K8S_
CONTAINER_ STATUS_ LAST_ TERMINATED_ REASON - Last terminated reason of the Container.
- K8S_
CRONJOB_ ANNOTATION - The cronjob annotation placed on the CronJob, the
keybeing the annotation name, the value being the annotation value. - K8S_
CRONJOB_ LABEL - The label placed on the CronJob, the
keybeing the label name, the value being the label value. - K8S_
CRONJOB_ NAME - The name of the CronJob.
- K8S_
CRONJOB_ UID - The UID of the CronJob.
- K8S_
DAEMONSET_ ANNOTATION - The annotation placed on the DaemonSet, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
DAEMONSET_ LABEL - The label placed on the DaemonSet, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
DAEMONSET_ NAME - The name of the DaemonSet.
- K8S_
DAEMONSET_ UID - The UID of the DaemonSet.
- K8S_
DEPLOYMENT_ ANNOTATION - The annotation placed on the Deployment, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
DEPLOYMENT_ LABEL - The label placed on the Deployment, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
DEPLOYMENT_ NAME - The name of the Deployment.
- K8S_
DEPLOYMENT_ UID - The UID of the Deployment.
- K8S_
HPA_ NAME - The name of the horizontal pod autoscaler.
- K8S_
HPA_ SCALETARGETREF_ API_ VERSION - The API version of the target resource to scale for the HorizontalPodAutoscaler.
- K8S_
HPA_ SCALETARGETREF_ KIND - The kind of the target resource to scale for the HorizontalPodAutoscaler.
- K8S_
HPA_ SCALETARGETREF_ NAME - The name of the target resource to scale for the HorizontalPodAutoscaler.
- K8S_
HPA_ UID - The UID of the horizontal pod autoscaler.
- K8S_
JOB_ ANNOTATION - The annotation placed on the Job, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
JOB_ LABEL - The label placed on the Job, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
JOB_ NAME - The name of the Job.
- K8S_
JOB_ UID - The UID of the Job.
- K8S_
NAMESPACE_ ANNOTATION - The annotation placed on the Namespace, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
NAMESPACE_ LABEL - The label placed on the Namespace, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
NAMESPACE_ NAME - The name of the namespace that the pod is running in.
- K8S_
NODE_ ANNOTATION - The annotation placed on the Node, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
NODE_ LABEL - The label placed on the Node, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
NODE_ NAME - The name of the Node.
- K8S_
NODE_ UID - The UID of the Node.
- K8S_
POD_ ANNOTATION - The annotation placed on the Pod, the
keybeing the annotation name, the value being the annotation value. - K8S_
POD_ LABEL - The label placed on the Pod, the
keybeing the label name, the value being the label value. - K8S_
POD_ NAME - The name of the Pod.
- K8S_
POD_ UID - The UID of the Pod.
- K8S_
REPLICASET_ ANNOTATION - The annotation placed on the ReplicaSet, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
REPLICASET_ LABEL - The label placed on the ReplicaSet, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
REPLICASET_ NAME - The name of the ReplicaSet.
- K8S_
REPLICASET_ UID - The UID of the ReplicaSet.
- K8S_
REPLICATIONCONTROLLER_ NAME - The name of the replication controller.
- K8S_
REPLICATIONCONTROLLER_ UID - The UID of the replication controller.
- K8S_
RESOURCEQUOTA_ NAME - The name of the resource quota.
- K8S_
RESOURCEQUOTA_ UID - The UID of the resource quota.
- K8S_
STATEFULSET_ ANNOTATION - The annotation placed on the StatefulSet, the
keybeing the annotation name, the value being the annotation value, even if the value is empty. - K8S_
STATEFULSET_ LABEL - The label placed on the StatefulSet, the
keybeing the label name, the value being the label value, even if the value is empty. - K8S_
STATEFULSET_ NAME - The name of the StatefulSet.
- K8S_
STATEFULSET_ UID - The UID of the StatefulSet.
- MAINFRAME_
LPAR_ NAME - Name of the logical partition that hosts a systems with a mainframe operating system.
- OCI_
MANIFEST_ DIGEST - The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.
- OS_
BUILD_ ID - Unique identifier for a particular build or compilation of the operating system.
- OS_
DESCRIPTION - Human readable (not intended to be parsed) OS version information, like e.g. reported by
verorlsb_release -acommands. - OS_NAME
- Human readable operating system name.
- OS_TYPE
- The operating system type.
- OS_
VERSION - The version string of the operating system as defined in Version Attributes.
- OTEL_
SCOPE_ NAME - The name of the instrumentation scope - (
InstrumentationScope.Namein OTLP). - OTEL_
SCOPE_ VERSION - The version of the instrumentation scope - (
InstrumentationScope.Versionin OTLP). - PROCESS_
COMMAND - The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in
proc/[pid]/cmdline. On Windows, can be set to the first parameter extracted fromGetCommandLineW. - PROCESS_
COMMAND_ ARGS - 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
proc/[pid]/cmdline. For libc-based executables, this would be the full argv vector passed tomain. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. - PROCESS_
COMMAND_ LINE - 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
GetCommandLineW. Do not set this if you have to assemble it just for monitoring; useprocess.command_argsinstead. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. - PROCESS_
EXECUTABLE_ NAME - The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of
/proc/[pid]/exe. On Windows, this SHOULD be set to the base name ofGetProcessImageFileNameW. - PROCESS_
EXECUTABLE_ PATH - The full path to the process executable. On Linux based systems, can be set to the target of
proc/[pid]/exe. On Windows, can be set to the result ofGetProcessImageFileNameW. - PROCESS_
LINUX_ CGROUP - The control group associated with the process.
- PROCESS_
OWNER - The username of the user that owns the process.
- PROCESS_
PARENT_ PID - Parent Process identifier (PPID).
- PROCESS_
PID - Process identifier (PID).
- PROCESS_
RUNTIME_ DESCRIPTION - An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.
- PROCESS_
RUNTIME_ NAME - The name of the runtime of this process.
- PROCESS_
RUNTIME_ VERSION - The version of the runtime of this process, as returned by the runtime without modification.
- SERVICE_
INSTANCE_ ID - The string ID of the service instance.
- SERVICE_
NAME - Logical name of the service.
- SERVICE_
NAMESPACE - A namespace for
service.name. - SERVICE_
VERSION - The version string of the service API or implementation. The format is not defined by these conventions.
- TELEMETRY_
DISTRO_ NAME - The name of the auto instrumentation agent or distribution, if used.
- TELEMETRY_
DISTRO_ VERSION - The version string of the auto instrumentation agent or distribution, if used.
- TELEMETRY_
SDK_ LANGUAGE - The language of the telemetry SDK.
- TELEMETRY_
SDK_ NAME - The name of the telemetry SDK as defined above.
- TELEMETRY_
SDK_ VERSION - The version string of the telemetry SDK.
- USER_
AGENT_ ORIGINAL - Value of the HTTP User-Agent header sent by the client.
- VCS_
REF_ HEAD_ NAME - The name of the reference such as branch or tag in the repository.
- VCS_
REF_ HEAD_ REVISION - The revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN.
- VCS_
REF_ TYPE - The type of the reference in the repository.
- VCS_
REPOSITORY_ NAME - The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.
- VCS_
REPOSITORY_ URL_ FULL - The canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.
- WEBENGINE_
DESCRIPTION - Additional description of the web engine (e.g. detailed version and edition information).
- WEBENGINE_
NAME - The name of the web engine.
- WEBENGINE_
VERSION - The version of the web engine.
- ZOS_
SMF_ ID - The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.
- ZOS_
SYSPLEX_ NAME - The name of the SYSPLEX to which the z/OS system belongs too.