Module resource
Expand description
§Resource Semantic Conventions
The resource semantic conventions define a set of standardized attributes
to be used in Resource
s.
§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. - 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
- 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 the resource is running.
- 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,
<key>
being 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_
CLOUD_ RUN_ JOB_ EXECUTION - The name of the Cloud Run execution being run for the Job, as set by the
CLOUD_RUN_EXECUTION
environment variable. - GCP_
CLOUD_ RUN_ JOB_ TASK_ INDEX - The index for a task within an execution as provided by the
CLOUD_RUN_TASK_INDEX
environment 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-id
based 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-system
namespace. - 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_ NAME - The name of the CronJob.
- K8S_
CRONJOB_ UID - The UID of the CronJob.
- K8S_
DAEMONSET_ NAME - The name of the DaemonSet.
- K8S_
DAEMONSET_ UID - The UID of the DaemonSet.
- 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_ UID - The UID of the horizontal pod autoscaler.
- K8S_
JOB_ NAME - The name of the Job.
- K8S_
JOB_ UID - The UID of the Job.
- K8S_
NAMESPACE_ NAME - The name of the namespace that the pod is running in.
- K8S_
NODE_ NAME - The name of the Node.
- K8S_
NODE_ UID - The UID of the Node.
- K8S_
POD_ ANNOTATION - The annotation key-value pairs placed on the Pod, the
<key>
being the annotation name, the value being the annotation value. - K8S_
POD_ LABEL - The label key-value pairs placed on the Pod, the
<key>
being 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_ 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_ NAME - The name of the StatefulSet.
- K8S_
STATEFULSET_ UID - The UID of the StatefulSet.
- 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
ver
orlsb_release -a
commands. - 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.Name
in OTLP). - OTEL_
SCOPE_ VERSION - The version of the instrumentation scope - (
InstrumentationScope.Version
in 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
. - 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_args
instead. - 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.
- 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.