From d128468a291d8dffb7e9db8fde656416d9d072ee Mon Sep 17 00:00:00 2001 From: William Armiros Date: Wed, 13 Jan 2021 16:10:29 -0800 Subject: [PATCH 1/3] lowercased ECS launch types --- semantic_conventions/resource/cloud_provider/aws/ecs.yaml | 6 +++--- .../resource/semantic_conventions/cloud_provider/aws/ecs.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml index 543639c4c81..3c8b0d72268 100644 --- a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml @@ -19,12 +19,12 @@ groups: allow_custom_values: false members: - id: ec2 - value: "EC2" + value: "ec2" - id: fargate - value: "Fargate" + value: "fargate" brief: > The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - examples: ['EC2', 'Fargate'] + examples: ['ec2', 'fargate'] - id: task.arn type: string brief: > diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md index 37422d2c111..1fed67dd55a 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -9,7 +9,7 @@ |---|---|---|---|---| | `aws.ecs.container.arn` | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | No | | `aws.ecs.cluster.arn` | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | No | -| `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `EC2`
`Fargate` | No | +| `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2`
`fargate` | No | | `aws.ecs.task.arn` | string | The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b` | No | | `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | No | @@ -17,6 +17,6 @@ | Value | Description | |---|---| -| `EC2` | ec2 | -| `Fargate` | fargate | +| `ec2` | ec2 | +| `fargate` | fargate | From 1537139e1a2d031b84aad209983c54e26e32d6da Mon Sep 17 00:00:00 2001 From: William Armiros Date: Tue, 26 Jan 2021 11:42:10 -0800 Subject: [PATCH 2/3] updated changelog --- CHANGELOG.md | 3 ++ .../metrics/semantic_conventions/rpc.md | 12 +++--- .../resource/semantic_conventions/README.md | 4 +- .../resource/semantic_conventions/cloud.md | 4 +- .../cloud_provider/aws/ecs.md | 4 +- .../cloud_provider/aws/logs.md | 10 ++--- .../semantic_conventions/container.md | 2 +- .../deployment_environment.md | 4 +- .../resource/semantic_conventions/faas.md | 2 +- .../resource/semantic_conventions/host.md | 4 +- .../resource/semantic_conventions/k8s.md | 20 +++++----- .../resource/semantic_conventions/os.md | 4 +- .../resource/semantic_conventions/process.md | 14 +++---- .../trace/semantic_conventions/database.md | 40 +++++++++---------- .../trace/semantic_conventions/exceptions.md | 6 +-- .../trace/semantic_conventions/faas.md | 16 ++++---- .../trace/semantic_conventions/http.md | 10 ++--- .../trace/semantic_conventions/messaging.md | 26 ++++++------ .../trace/semantic_conventions/rpc.md | 16 ++++---- .../semantic_conventions/span-general.md | 14 +++---- 20 files changed, 109 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b10cc66b1c..227f8b4a818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,9 @@ Updates: - Resource SDK: Reverse (suggested) order of Resource.Merge parameters, remove special case for empty strings ([#1345](https://github.com/open-telemetry/opentelemetry-specification/pull/1345)) +- Resource attributes: lowerecased the allowed values of the `aws.ecs.launchtype` + attribute + ([#1339](https://github.com/open-telemetry/opentelemetry-specification/pull/1339)) ## v0.7.0 (11-18-2020) diff --git a/specification/metrics/semantic_conventions/rpc.md b/specification/metrics/semantic_conventions/rpc.md index 9e0cb72b808..946a023e5db 100644 --- a/specification/metrics/semantic_conventions/rpc.md +++ b/specification/metrics/semantic_conventions/rpc.md @@ -56,15 +56,15 @@ Below is a table of labels that SHOULD be included on metric events and whether or not they should be on the server, client or both. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | -| [`rpc.service`](../../trace/semantic_conventions/rpc.md) | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | No, but recommended | -| [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | No, but recommended | +| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. | `grpc`
`java_rmi`
`wcf` | Yes | +| [`rpc.service`](../../trace/semantic_conventions/rpc.md) | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | Conditional
No, but recommended | +| [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | Conditional
No, but recommended | | [`net.peer.ip`](../../trace/semantic_conventions/span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below | -| [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | number | Remote port number. | `80`; `8080`; `443` | See below | -| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below | +| [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional
See below | +| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional
See below | **Additional attribute requirements:** At least one of the following sets of attributes is required: diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index c3a3bc68f04..2d6d6e45394 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -48,7 +48,7 @@ as specified in the [Resource SDK specification](../sdk.md#sdk-provided-resource **Description:** A service instance. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `service.name` | string | Logical name of the service. [1] | `shoppingcart` | Yes | | `service.namespace` | string | A namespace for `service.name`. [2] | `Shop` | No | @@ -92,7 +92,7 @@ The identifier `opentelemetry` is reserved and MUST NOT be used in this case. The identifier SHOULD be stable across different versions of an implementation. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `telemetry.sdk.name` | string | The name of the telemetry SDK as defined above. | `opentelemetry` | No | | `telemetry.sdk.language` | string | The language of the telemetry SDK. | `cpp` | No | diff --git a/specification/resource/semantic_conventions/cloud.md b/specification/resource/semantic_conventions/cloud.md index b62fdf7a34d..c8103bb8c16 100644 --- a/specification/resource/semantic_conventions/cloud.md +++ b/specification/resource/semantic_conventions/cloud.md @@ -5,13 +5,13 @@ **Description:** A cloud infrastructure (e.g. GCP, Azure, AWS). -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `cloud.provider` | string | Name of the cloud provider. | `gcp` | No | | `cloud.account.id` | string | The cloud account ID used to identify different entities. | `opentelemetry` | No | | `cloud.region` | string | A specific geographical location where different entities can run. | `us-central1` | No | | `cloud.zone` | string | Zones are a sub set of the region connected through low-latency links. [1] | `us-central1-a` | No | -| `cloud.infrastructure_service` | string | The cloud infrastructure resource in use. [2] | `aws_ec2`; `azure_vm`; `gcp_compute_engine` | No | +| `cloud.infrastructure_service` | string | The cloud infrastructure resource in use. [2] | `aws_ec2`
`azure_vm`
`gcp_compute_engine` | No | **[1]:** In AWS, this is called availability-zone. diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md index 1b6cd220344..1fed67dd55a 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -5,11 +5,11 @@ **Description:** Resources used by AWS Elastic Container Service (ECS). -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `aws.ecs.container.arn` | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | No | | `aws.ecs.cluster.arn` | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | No | -| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2`; `fargate` | No | +| `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2`
`fargate` | No | | `aws.ecs.task.arn` | string | The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b` | No | | `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | No | diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md index 29d76486e36..5973349ea26 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md @@ -5,12 +5,12 @@ **Description:** Log attributes for Amazon Web Services. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `[/aws/lambda/my-function, opentelemetry-service]` | No | -| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [2] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*]` | No | -| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | No | -| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | No | +| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `/aws/lambda/my-function`
`opentelemetry-service` | No | +| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | +| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | **[1]:** Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. diff --git a/specification/resource/semantic_conventions/container.md b/specification/resource/semantic_conventions/container.md index a8b6c37b5e1..c427706922f 100644 --- a/specification/resource/semantic_conventions/container.md +++ b/specification/resource/semantic_conventions/container.md @@ -5,7 +5,7 @@ **Description:** A container instance. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `container.name` | string | Container name. | `opentelemetry-autoconf` | No | | `container.id` | string | Container id. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | No | diff --git a/specification/resource/semantic_conventions/deployment_environment.md b/specification/resource/semantic_conventions/deployment_environment.md index 5a1303a8f40..81ded1b7050 100644 --- a/specification/resource/semantic_conventions/deployment_environment.md +++ b/specification/resource/semantic_conventions/deployment_environment.md @@ -5,7 +5,7 @@ **Description:** The software deployment. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `deployment.environment` | string | Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). | `staging`; `production` | No | +| `deployment.environment` | string | Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). | `staging`
`production` | No | diff --git a/specification/resource/semantic_conventions/faas.md b/specification/resource/semantic_conventions/faas.md index 15039f4b102..0048d6576ac 100644 --- a/specification/resource/semantic_conventions/faas.md +++ b/specification/resource/semantic_conventions/faas.md @@ -5,7 +5,7 @@ **Description:** A serverless instance. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `faas.name` | string | The name of the function being executed. | `my-function` | Yes | | `faas.id` | string | The unique ID of the function being executed. [1] | `arn:aws:lambda:us-west-2:123456789012:function:my-function` | Yes | diff --git a/specification/resource/semantic_conventions/host.md b/specification/resource/semantic_conventions/host.md index 3ea7e898f08..af5681a336b 100644 --- a/specification/resource/semantic_conventions/host.md +++ b/specification/resource/semantic_conventions/host.md @@ -5,12 +5,12 @@ **Description:** A host is defined as a general computing instance. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `host.id` | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. | `opentelemetry-test` | No | | `host.name` | string | 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. | `opentelemetry-test` | No | | `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` | No | -| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` | No | +| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`
`CentOS-8-x86_64-1905` | No | | `host.image.id` | string | VM image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | No | | `host.image.version` | string | The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). | `0.1` | No | diff --git a/specification/resource/semantic_conventions/k8s.md b/specification/resource/semantic_conventions/k8s.md index 27ada74ebe6..402f90ef372 100644 --- a/specification/resource/semantic_conventions/k8s.md +++ b/specification/resource/semantic_conventions/k8s.md @@ -20,7 +20,7 @@ Kubernetes object, but "name" is usually more user friendly so can be also set. **Description:** A Kubernetes Cluster. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | No | @@ -35,7 +35,7 @@ a namespace, but not across namespaces. **Description:** A Kubernetes Namespace. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | No | @@ -50,7 +50,7 @@ containers on your cluster. **Description:** A Kubernetes Pod object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | No | @@ -70,7 +70,7 @@ to a running container. **Description:** A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.container.name` | string | The name of the Container in a Pod template. | `redis` | No | @@ -85,7 +85,7 @@ any given time. **Description:** A Kubernetes ReplicaSet object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | No | @@ -102,7 +102,7 @@ distributed among the nodes of a cluster. **Description:** A Kubernetes Deployment object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` | No | @@ -118,7 +118,7 @@ about the ordering and uniqueness of these Pods. **Description:** A Kubernetes StatefulSet object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` | No | @@ -133,7 +133,7 @@ A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. **Description:** A Kubernetes DaemonSet object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` | No | @@ -149,7 +149,7 @@ successfully terminate. **Description:** A Kubernetes Job object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.job.name` | string | The name of the Job. | `opentelemetry` | No | @@ -164,7 +164,7 @@ A CronJob creates Jobs on a repeating schedule. **Description:** A Kubernetes CronJob object. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` | No | diff --git a/specification/resource/semantic_conventions/os.md b/specification/resource/semantic_conventions/os.md index 6b8434fa634..03aaba08bf8 100644 --- a/specification/resource/semantic_conventions/os.md +++ b/specification/resource/semantic_conventions/os.md @@ -7,10 +7,10 @@ In case of virtualized environments, this is the operating system as it is observed by the process, i.e., the virtualized guest rather than the underlying host. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `os.type` | string | The operating system type. | `WINDOWS` | Yes | -| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`; `Ubuntu 18.04.1 LTS` | No | +| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`
`Ubuntu 18.04.1 LTS` | No | `os.type` MUST be one of the following or, if none of the listed values apply, a custom value: diff --git a/specification/resource/semantic_conventions/process.md b/specification/resource/semantic_conventions/process.md index f0fcc869322..68dc22979c9 100644 --- a/specification/resource/semantic_conventions/process.md +++ b/specification/resource/semantic_conventions/process.md @@ -23,14 +23,14 @@ **Description:** An operating system process. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `process.pid` | number | Process identifier (PID). | `1234` | No | -| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | See below | -| `process.executable.path` | string | 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 of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | See below | -| `process.command` | string | 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 from `GetCommandLineW`. | `cmd/otelcol` | See below | -| `process.command_line` | string | 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; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | See below | -| `process.command_args` | string[] | 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 to `main`. | `[cmd/otecol, --config=config.yaml]` | See below | +| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | Conditional
See below | +| `process.executable.path` | string | 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 of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | Conditional
See below | +| `process.command` | string | 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 from `GetCommandLineW`. | `cmd/otelcol` | Conditional
See below | +| `process.command_line` | string | 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; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | Conditional
See below | +| `process.command_args` | string[] | 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 to `main`. | `cmd/otecol`
`--config=config.yaml` | Conditional
See below | | `process.owner` | string | The username of the user that owns the process. | `root` | No | @@ -51,7 +51,7 @@ At least one of `process.executable.name`, `process.executable.path`, `process.c **Description:** The single (language) runtime instance which is monitored. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `process.runtime.name` | string | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `OpenJDK Runtime Environment` | No | | `process.runtime.version` | string | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | No | diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 86f37c467a7..045fed996e8 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -36,15 +36,15 @@ These attributes will usually be the same for all operations performed over the Some database systems may allow a connection to switch to a different `db.user`, for example, and other database systems may not even have the concept of a connection at all. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `db.system` | string | An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. | `other_sql` | Yes | | `db.connection_string` | string | The connection string used to connect to the database. It is recommended to remove embedded credentials. | `Server=(localdb)\v11.0;Integrated Security=true;` | No | -| `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | No | -| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below. | -| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below. | -| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`; `8080`; `443` | Conditional [1] | -| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | Conditional [2] | +| `db.user` | string | Username for accessing the database. | `readonly_user`
`reporting_user` | No | +| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Conditional
See below. | +| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | Conditional
See below. | +| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional [1] | +| [`net.transport`](span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional [2] | **[1]:** Required if using a port other than the default port for this DBMS. @@ -126,9 +126,9 @@ When additional attributes are added that only apply to a specific DBMS, its ide ### Connection-level attributes for specific technologies -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `db.jdbc.driver_classname` | string | The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. | `org.postgresql.Driver`; `com.microsoft.sqlserver.jdbc.SQLServerDriver` | No | +| `db.jdbc.driver_classname` | string | The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. | `org.postgresql.Driver`
`com.microsoft.sqlserver.jdbc.SQLServerDriver` | No | | `db.mssql.instance_name` | string | The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. [1] | `MSSQLSERVER` | No | **[1]:** If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). @@ -140,11 +140,11 @@ These attributes may be different for each operation performed, even if the same Usually only one `db.name` will be used per connection though. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `db.name` | string | If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). [1] | `customers`; `main` | Conditional [2] | -| `db.statement` | string | The database statement being executed. [3] | `SELECT * FROM wuser_table`; `SET mykey "WuValue"` | Required if applicable. | -| `db.operation` | string | The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. [4] | `findAndModify`; `HMSET`; `SELECT` | Required, if `db.statement` is not applicable. | +| `db.name` | string | If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). [1] | `customers`
`main` | Conditional [2] | +| `db.statement` | string | The database statement being executed. [3] | `SELECT * FROM wuser_table`
`SET mykey "WuValue"` | Conditional
Required if applicable. | +| `db.operation` | string | The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. [4] | `findAndModify`
`HMSET`
`SELECT` | Conditional
Required, if `db.statement` is not applicable. | **[1]:** In some SQL databases, the database name to be used is called "schema name". @@ -168,12 +168,12 @@ For example, when retrieving a document, `db.operation` would be set to (literal ### Call-level attributes for specific technologies -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `db.hbase.namespace` | string | The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. | `default` | Yes | -| `db.redis.database_index` | number | The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. | `0`; `1`; `15` | Conditional [1] | -| `db.mongodb.collection` | string | The collection being accessed within the database stated in `db.name`. | `customers`; `products` | Yes | -| `db.sql.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [2] | `public.users`; `customers` | Recommended if available. | +| `db.redis.database_index` | number | The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. | `0`
`1`
`15` | Conditional [1] | +| `db.mongodb.collection` | string | The collection being accessed within the database stated in `db.name`. | `customers`
`products` | Yes | +| `db.sql.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [2] | `public.users`
`customers` | Conditional
Recommended if available. | **[1]:** Required, if other than the default database (`0`). @@ -185,14 +185,14 @@ For example, when retrieving a document, `db.operation` would be set to (literal Separated for clarity. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `db.cassandra.keyspace` | string | The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. | `mykeyspace` | Yes | | `db.cassandra.page_size` | number | The fetch size used for paging, i.e. how many rows will be returned at once. | `5000` | No | -| `db.cassandra.consistency_level` | string | The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). | `ALL` | No | -| `db.cassandra.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [1] | `mytable` | Recommended if available. | +| `db.cassandra.consistency_level` | string enum | The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). | `ALL` | No | +| `db.cassandra.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [1] | `mytable` | Conditional
Recommended if available. | | `db.cassandra.idempotence` | boolean | Whether or not the query is idempotent. | | No | -| `db.cassandra.speculative_execution_count` | number | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`; `2` | No | +| `db.cassandra.speculative_execution_count` | number | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`
`2` | No | | `db.cassandra.coordinator.id` | string | The ID of the coordinating node for a query. | `be13faa2-8574-4d71-926d-27f16cf8a7af` | No | | `db.cassandra.coordinator.dc` | string | The data center of the coordinating node for a query. | `us-west-2` | No | diff --git a/specification/trace/semantic_conventions/exceptions.md b/specification/trace/semantic_conventions/exceptions.md index b7f996861cd..3aaad32d151 100644 --- a/specification/trace/semantic_conventions/exceptions.md +++ b/specification/trace/semantic_conventions/exceptions.md @@ -40,10 +40,10 @@ The table below indicates which attributes should be added to the `Event` and their types. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `exception.type` | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` | See below | -| `exception.message` | string | The exception message. | `Division by zero`; `Can't convert 'int' object to str implicitly` | See below | +| `exception.type` | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`
`OSError` | See below | +| `exception.message` | string | The exception message. | `Division by zero`
`Can't convert 'int' object to str implicitly` | See below | | `exception.stacktrace` | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | No | | `exception.escaped` | boolean | SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. [1] | | No | diff --git a/specification/trace/semantic_conventions/faas.md b/specification/trace/semantic_conventions/faas.md index d0646bff222..ffb64c64a8e 100644 --- a/specification/trace/semantic_conventions/faas.md +++ b/specification/trace/semantic_conventions/faas.md @@ -28,9 +28,9 @@ Span `name` should be set to the function name being executed. Depending on the If Spans following this convention are produced, a Resource of type `faas` MUST exist following the [Resource semantic convention](../../resource/semantic_conventions/faas.md#function-as-a-service). -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `faas.trigger` | string | Type of the trigger on which the function is executed. | `datasource` | Conditional [1] | +| `faas.trigger` | string enum | Type of the trigger on which the function is executed. | `datasource` | Conditional [1] | | `faas.execution` | string | The execution ID of the current function execution. | `af9d5aa4-a685-4c5f-a22b-444f80b3cc28` | No | **[1]:** On FaaS instances, faas.trigger MUST be set on incoming invocations. Clients invoking FaaS instances MUST set `faas.trigger` on outgoing invocations, if it is known to the client. This is, for example, not the case, when the transport layer is abstracted in a FaaS client framework without access to its configuration. @@ -80,7 +80,7 @@ This section describes incoming FaaS invocations as they are reported by the Faa For incoming FaaS spans, the span kind MUST be `Server`. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `faas.coldstart` | boolean | A boolean that is true if the serverless function is executed for the first time (aka cold-start). | | No | @@ -96,7 +96,7 @@ the corresponding [FaaS resource attributes][] and [Cloud resource attributes][] which the invoked FaaS instance reports about itself, if it's instrumented. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `faas.invoked_name` | string | The name of the invoked function. [1] | `my-function` | Yes | | `faas.invoked_provider` | string | The cloud provider of the invoked function. [2] | `aws` | Yes | @@ -132,12 +132,12 @@ A datasource function is triggered as a response to some data source operation s For `faas` spans with trigger `datasource`, it is recommended to set the following attributes. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `faas.document.collection` | string | The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. | `myBucketName`; `myDbName` | Yes | +| `faas.document.collection` | string | The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. | `myBucketName`
`myDbName` | Yes | | `faas.document.operation` | string | Describes the type of the operation that was performed on the data. | `insert` | Yes | | `faas.document.time` | string | A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). | `2020-01-23T13:47:06Z` | Yes | -| `faas.document.name` | string | The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. | `myFile.txt`; `myTableName` | No | +| `faas.document.name` | string | The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. | `myFile.txt`
`myTableName` | No | `faas.document.operation` MUST be one of the following or, if none of the listed values apply, a custom value: @@ -164,7 +164,7 @@ This way, it is possible to correlate each individual message with its execution A function is scheduled to be executed regularly. The following additional attributes are recommended. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `faas.time` | string | A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). | `2020-01-23T13:47:06Z` | Yes | | `faas.cron` | string | A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). | `0/5 * * * ? *` | No | diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index 22ad4b1dd57..c9efe0b0231 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -50,14 +50,14 @@ Don't set the span status description if the reason can be inferred from `http.s ## Common Attributes -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `http.method` | string | HTTP request method. | `GET`; `POST`; `HEAD` | Yes | +| `http.method` | string | HTTP request method. | `GET`
`POST`
`HEAD` | Yes | | `http.url` | string | Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` | No | | `http.target` | string | The full request target as passed in a HTTP request line or equivalent. | `/path/12314/?q=ddds#123` | No | | `http.host` | string | The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is empty or not present, this attribute should be the same. | `www.example.org` | No | -| `http.scheme` | string | The URI scheme identifying the used protocol. | `http`; `https` | No | -| `http.status_code` | number | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | If and only if one was received/sent. | +| `http.scheme` | string | The URI scheme identifying the used protocol. | `http`
`https` | No | +| `http.status_code` | number | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditional
If and only if one was received/sent. | | `http.flavor` | string | Kind of HTTP protocol used [1] | `1.0` | No | | `http.user_agent` | string | Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | No | | `http.request_content_length` | number | The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. | `3495` | No | @@ -166,7 +166,7 @@ If the route does not include the application root, it SHOULD be prepended to th If the route cannot be determined, the `name` attribute MUST be set as defined in the general semantic conventions for HTTP. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `http.server_name` | string | The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). [1] | `example.com` | See below | | `http.route` | string | The matched route (path template). | `/users/:userID?` | No | diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 1987ed260ad..4523014ffda 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -123,21 +123,21 @@ The following operations related to messages are defined for these semantic conv ## Messaging attributes -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `activemq` | Yes | -| `messaging.destination` | string | The message destination name. This might be equal to the span name but is required nevertheless. | `MyQueue`; `MyTopic` | Yes | -| `messaging.destination_kind` | string | The kind of message destination | `queue` | Conditional [1] | -| `messaging.temp_destination` | boolean | A boolean that is true if the message destination is temporary. | | If missing, it is assumed to be false. | -| `messaging.protocol` | string | The name of the transport protocol. | `AMQP`; `MQTT` | No | +| `messaging.system` | string | A string identifying the messaging system. | `kafka`
`rabbitmq`
`activemq` | Yes | +| `messaging.destination` | string | The message destination name. This might be equal to the span name but is required nevertheless. | `MyQueue`
`MyTopic` | Yes | +| `messaging.destination_kind` | string enum | The kind of message destination | `queue` | Conditional [1] | +| `messaging.temp_destination` | boolean | A boolean that is true if the message destination is temporary. | | Conditional
If missing, it is assumed to be false. | +| `messaging.protocol` | string | The name of the transport protocol. | `AMQP`
`MQTT` | No | | `messaging.protocol_version` | string | The version of the transport protocol. | `0.9.1` | No | -| `messaging.url` | string | Connection string. | `tibjmsnaming://localhost:7222`; `https://queue.amazonaws.com/80398EXAMPLE/MyQueue` | No | +| `messaging.url` | string | Connection string. | `tibjmsnaming://localhost:7222`
`https://queue.amazonaws.com/80398EXAMPLE/MyQueue` | No | | `messaging.message_id` | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | No | | `messaging.conversation_id` | string | The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". | `MyConversationId` | No | | `messaging.message_payload_size_bytes` | number | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | No | | `messaging.message_payload_compressed_size_bytes` | number | The compressed size of the message payload in bytes. | `2048` | No | -| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | If available. | -| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. [2] | `example.com` | If available. | +| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Conditional
If available. | +| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. [2] | `example.com` | Conditional
If available. | **[1]:** Required only if the message destination is either a `queue` or `topic`. @@ -162,9 +162,9 @@ These attributes should be set to the broker to which the message is sent/from w For message consumers, the following additional attributes may be set: -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `messaging.operation` | string | A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. | `receive` | No | +| `messaging.operation` | string enum | A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. | `receive` | No | `messaging.operation` MUST be one of the following: @@ -194,13 +194,13 @@ The routing key MUST be provided to the attribute `messaging.rabbitmq.routing_ke For Apache Kafka, the following additional attributes are defined: -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `messaging.kafka.message_key` | string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [1] | `myKey` | No | | `messaging.kafka.consumer_group` | string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. | `my-group` | No | | `messaging.kafka.client_id` | string | Client Id for the Consumer or Producer that is handling the message. | `client-5` | No | | `messaging.kafka.partition` | number | Partition the message is sent to. | `2` | No | -| `messaging.kafka.tombstone` | boolean | A boolean that is true if the message is a tombstone. | | If missing, it is assumed to be false. | +| `messaging.kafka.tombstone` | boolean | A boolean that is true if the message is a tombstone. | | Conditional
If missing, it is assumed to be false. | **[1]:** If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index e710a948f2c..ff03ff95216 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -50,15 +50,15 @@ Examples of span names: ### Attributes -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `rpc.system` | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | -| `rpc.service` | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | No, but recommended | -| `rpc.method` | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | No, but recommended | +| `rpc.system` | string | A string identifying the remoting system. | `grpc`
`java_rmi`
`wcf` | Yes | +| `rpc.service` | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | Conditional
No, but recommended | +| `rpc.method` | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | Conditional
No, but recommended | | [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | | [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below | -| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`; `8080`; `443` | See below | -| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below | +| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional
See below | +| [`net.transport`](span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional
See below | **Additional attribute requirements:** At least one of the following sets of attributes is required: @@ -101,9 +101,9 @@ For remote procedure calls via [gRPC][], additional conventions are described in ### gRPC Attributes -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `rpc.grpc.status_code` | number | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`; `1`; `16` | Yes | +| `rpc.grpc.status_code` | number enum | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`
`1`
`16` | Yes | `rpc.grpc.status_code` MUST be one of the following: diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index c6cc292682f..1f637eec1fc 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -30,11 +30,11 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `net.transport` | string | Transport protocol used. See note below. | `IP.TCP` | No | +| `net.transport` | string enum | Transport protocol used. See note below. | `IP.TCP` | No | | `net.peer.ip` | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | No | -| `net.peer.port` | number | Remote port number. | `80`; `8080`; `443` | No | +| `net.peer.port` | number | Remote port number. | `80`
`8080`
`443` | No | | `net.peer.name` | string | Remote hostname or similar, see note below. | `example.com` | No | | `net.host.ip` | string | Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. | `192.168.0.1` | No | | `net.host.port` | number | Like `net.peer.port` but for the host port. | `35555` | No | @@ -81,7 +81,7 @@ Users can define what the name of a service is based on their particular semanti Instrumentations SHOULD provide a way for users to configure this name. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `peer.service` | string | The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `AuthTokenCache` | No | @@ -96,7 +96,7 @@ Examples of `peer.service` that users may specify: These attributes may be used for any operation with an authenticated and/or authorized enduser. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `enduser.id` | string | Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. | `username` | No | | `enduser.role` | string | Actual/assumed role the client is making the request under extracted from token or application security context. | `admin` | No | @@ -145,7 +145,7 @@ These attributes may be used for any operation to store information about a thread that started a span. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `thread.id` | number | Current "managed" thread ID (as opposed to OS thread ID). | `42` | No | | `thread.name` | string | Current thread name. | `main` | No | @@ -171,7 +171,7 @@ The attributes listed below allow to report this unit of code and therefore to p about the span. -| Attribute | Type | Description | Examples | Required | +| Attribute | Type | Description | Example | Required | |---|---|---|---|---| | `code.function` | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | No | | `code.namespace` | string | The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. | `com.example.MyHttpService` | No | From 4db3950ec9a43c8c8db9d304210a78d756d7f72e Mon Sep 17 00:00:00 2001 From: William Armiros Date: Wed, 27 Jan 2021 09:42:21 -0800 Subject: [PATCH 3/3] updated tables with 2.1 tool --- .../metrics/semantic_conventions/rpc.md | 12 +++--- .../resource/semantic_conventions/README.md | 4 +- .../resource/semantic_conventions/cloud.md | 4 +- .../cloud_provider/aws/ecs.md | 4 +- .../cloud_provider/aws/logs.md | 10 ++--- .../semantic_conventions/container.md | 2 +- .../deployment_environment.md | 4 +- .../resource/semantic_conventions/faas.md | 2 +- .../resource/semantic_conventions/host.md | 4 +- .../resource/semantic_conventions/k8s.md | 20 +++++----- .../resource/semantic_conventions/os.md | 4 +- .../resource/semantic_conventions/process.md | 14 +++---- .../trace/semantic_conventions/database.md | 40 +++++++++---------- .../trace/semantic_conventions/exceptions.md | 6 +-- .../trace/semantic_conventions/faas.md | 16 ++++---- .../trace/semantic_conventions/http.md | 10 ++--- .../trace/semantic_conventions/messaging.md | 26 ++++++------ .../trace/semantic_conventions/rpc.md | 16 ++++---- .../semantic_conventions/span-general.md | 14 +++---- 19 files changed, 106 insertions(+), 106 deletions(-) diff --git a/specification/metrics/semantic_conventions/rpc.md b/specification/metrics/semantic_conventions/rpc.md index 946a023e5db..9e0cb72b808 100644 --- a/specification/metrics/semantic_conventions/rpc.md +++ b/specification/metrics/semantic_conventions/rpc.md @@ -56,15 +56,15 @@ Below is a table of labels that SHOULD be included on metric events and whether or not they should be on the server, client or both. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. | `grpc`
`java_rmi`
`wcf` | Yes | -| [`rpc.service`](../../trace/semantic_conventions/rpc.md) | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | Conditional
No, but recommended | -| [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | Conditional
No, but recommended | +| [`rpc.system`](../../trace/semantic_conventions/rpc.md) | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | +| [`rpc.service`](../../trace/semantic_conventions/rpc.md) | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | No, but recommended | +| [`rpc.method`](../../trace/semantic_conventions/rpc.md) | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | No, but recommended | | [`net.peer.ip`](../../trace/semantic_conventions/span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | | [`net.peer.name`](../../trace/semantic_conventions/span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below | -| [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional
See below | -| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional
See below | +| [`net.peer.port`](../../trace/semantic_conventions/span-general.md) | number | Remote port number. | `80`; `8080`; `443` | See below | +| [`net.transport`](../../trace/semantic_conventions/span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below | **Additional attribute requirements:** At least one of the following sets of attributes is required: diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index 2d6d6e45394..c3a3bc68f04 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -48,7 +48,7 @@ as specified in the [Resource SDK specification](../sdk.md#sdk-provided-resource **Description:** A service instance. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `service.name` | string | Logical name of the service. [1] | `shoppingcart` | Yes | | `service.namespace` | string | A namespace for `service.name`. [2] | `Shop` | No | @@ -92,7 +92,7 @@ The identifier `opentelemetry` is reserved and MUST NOT be used in this case. The identifier SHOULD be stable across different versions of an implementation. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `telemetry.sdk.name` | string | The name of the telemetry SDK as defined above. | `opentelemetry` | No | | `telemetry.sdk.language` | string | The language of the telemetry SDK. | `cpp` | No | diff --git a/specification/resource/semantic_conventions/cloud.md b/specification/resource/semantic_conventions/cloud.md index c8103bb8c16..b62fdf7a34d 100644 --- a/specification/resource/semantic_conventions/cloud.md +++ b/specification/resource/semantic_conventions/cloud.md @@ -5,13 +5,13 @@ **Description:** A cloud infrastructure (e.g. GCP, Azure, AWS). -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `cloud.provider` | string | Name of the cloud provider. | `gcp` | No | | `cloud.account.id` | string | The cloud account ID used to identify different entities. | `opentelemetry` | No | | `cloud.region` | string | A specific geographical location where different entities can run. | `us-central1` | No | | `cloud.zone` | string | Zones are a sub set of the region connected through low-latency links. [1] | `us-central1-a` | No | -| `cloud.infrastructure_service` | string | The cloud infrastructure resource in use. [2] | `aws_ec2`
`azure_vm`
`gcp_compute_engine` | No | +| `cloud.infrastructure_service` | string | The cloud infrastructure resource in use. [2] | `aws_ec2`; `azure_vm`; `gcp_compute_engine` | No | **[1]:** In AWS, this is called availability-zone. diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md index 1fed67dd55a..1b6cd220344 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -5,11 +5,11 @@ **Description:** Resources used by AWS Elastic Container Service (ECS). -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `aws.ecs.container.arn` | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | No | | `aws.ecs.cluster.arn` | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | No | -| `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2`
`fargate` | No | +| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2`; `fargate` | No | | `aws.ecs.task.arn` | string | The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b` | No | | `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | No | diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md index 5973349ea26..29d76486e36 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md @@ -5,12 +5,12 @@ **Description:** Log attributes for Amazon Web Services. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `/aws/lambda/my-function`
`opentelemetry-service` | No | -| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | -| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | -| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `[/aws/lambda/my-function, opentelemetry-service]` | No | +| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [2] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*]` | No | +| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | No | +| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | No | **[1]:** Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. diff --git a/specification/resource/semantic_conventions/container.md b/specification/resource/semantic_conventions/container.md index c427706922f..a8b6c37b5e1 100644 --- a/specification/resource/semantic_conventions/container.md +++ b/specification/resource/semantic_conventions/container.md @@ -5,7 +5,7 @@ **Description:** A container instance. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `container.name` | string | Container name. | `opentelemetry-autoconf` | No | | `container.id` | string | Container id. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. | `a3bf90e006b2` | No | diff --git a/specification/resource/semantic_conventions/deployment_environment.md b/specification/resource/semantic_conventions/deployment_environment.md index 81ded1b7050..5a1303a8f40 100644 --- a/specification/resource/semantic_conventions/deployment_environment.md +++ b/specification/resource/semantic_conventions/deployment_environment.md @@ -5,7 +5,7 @@ **Description:** The software deployment. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `deployment.environment` | string | Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). | `staging`
`production` | No | +| `deployment.environment` | string | Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). | `staging`; `production` | No | diff --git a/specification/resource/semantic_conventions/faas.md b/specification/resource/semantic_conventions/faas.md index 0048d6576ac..15039f4b102 100644 --- a/specification/resource/semantic_conventions/faas.md +++ b/specification/resource/semantic_conventions/faas.md @@ -5,7 +5,7 @@ **Description:** A serverless instance. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `faas.name` | string | The name of the function being executed. | `my-function` | Yes | | `faas.id` | string | The unique ID of the function being executed. [1] | `arn:aws:lambda:us-west-2:123456789012:function:my-function` | Yes | diff --git a/specification/resource/semantic_conventions/host.md b/specification/resource/semantic_conventions/host.md index af5681a336b..3ea7e898f08 100644 --- a/specification/resource/semantic_conventions/host.md +++ b/specification/resource/semantic_conventions/host.md @@ -5,12 +5,12 @@ **Description:** A host is defined as a general computing instance. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `host.id` | string | Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. | `opentelemetry-test` | No | | `host.name` | string | 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. | `opentelemetry-test` | No | | `host.type` | string | Type of host. For Cloud, this must be the machine type. | `n1-standard-1` | No | -| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`
`CentOS-8-x86_64-1905` | No | +| `host.image.name` | string | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`; `CentOS-8-x86_64-1905` | No | | `host.image.id` | string | VM image ID. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | No | | `host.image.version` | string | The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). | `0.1` | No | diff --git a/specification/resource/semantic_conventions/k8s.md b/specification/resource/semantic_conventions/k8s.md index 402f90ef372..27ada74ebe6 100644 --- a/specification/resource/semantic_conventions/k8s.md +++ b/specification/resource/semantic_conventions/k8s.md @@ -20,7 +20,7 @@ Kubernetes object, but "name" is usually more user friendly so can be also set. **Description:** A Kubernetes Cluster. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.cluster.name` | string | The name of the cluster. | `opentelemetry-cluster` | No | @@ -35,7 +35,7 @@ a namespace, but not across namespaces. **Description:** A Kubernetes Namespace. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.namespace.name` | string | The name of the namespace that the pod is running in. | `default` | No | @@ -50,7 +50,7 @@ containers on your cluster. **Description:** A Kubernetes Pod object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.pod.uid` | string | The UID of the Pod. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.pod.name` | string | The name of the Pod. | `opentelemetry-pod-autoconf` | No | @@ -70,7 +70,7 @@ to a running container. **Description:** A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.container.name` | string | The name of the Container in a Pod template. | `redis` | No | @@ -85,7 +85,7 @@ any given time. **Description:** A Kubernetes ReplicaSet object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.replicaset.uid` | string | The UID of the ReplicaSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.replicaset.name` | string | The name of the ReplicaSet. | `opentelemetry` | No | @@ -102,7 +102,7 @@ distributed among the nodes of a cluster. **Description:** A Kubernetes Deployment object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.deployment.uid` | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.deployment.name` | string | The name of the Deployment. | `opentelemetry` | No | @@ -118,7 +118,7 @@ about the ordering and uniqueness of these Pods. **Description:** A Kubernetes StatefulSet object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.statefulset.uid` | string | The UID of the StatefulSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.statefulset.name` | string | The name of the StatefulSet. | `opentelemetry` | No | @@ -133,7 +133,7 @@ A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. **Description:** A Kubernetes DaemonSet object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.daemonset.uid` | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.daemonset.name` | string | The name of the DaemonSet. | `opentelemetry` | No | @@ -149,7 +149,7 @@ successfully terminate. **Description:** A Kubernetes Job object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.job.uid` | string | The UID of the Job. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.job.name` | string | The name of the Job. | `opentelemetry` | No | @@ -164,7 +164,7 @@ A CronJob creates Jobs on a repeating schedule. **Description:** A Kubernetes CronJob object. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `k8s.cronjob.uid` | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | No | | `k8s.cronjob.name` | string | The name of the CronJob. | `opentelemetry` | No | diff --git a/specification/resource/semantic_conventions/os.md b/specification/resource/semantic_conventions/os.md index 03aaba08bf8..6b8434fa634 100644 --- a/specification/resource/semantic_conventions/os.md +++ b/specification/resource/semantic_conventions/os.md @@ -7,10 +7,10 @@ In case of virtualized environments, this is the operating system as it is observed by the process, i.e., the virtualized guest rather than the underlying host. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `os.type` | string | The operating system type. | `WINDOWS` | Yes | -| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`
`Ubuntu 18.04.1 LTS` | No | +| `os.description` | string | Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. | `Microsoft Windows [Version 10.0.18363.778]`; `Ubuntu 18.04.1 LTS` | No | `os.type` MUST be one of the following or, if none of the listed values apply, a custom value: diff --git a/specification/resource/semantic_conventions/process.md b/specification/resource/semantic_conventions/process.md index 68dc22979c9..f0fcc869322 100644 --- a/specification/resource/semantic_conventions/process.md +++ b/specification/resource/semantic_conventions/process.md @@ -23,14 +23,14 @@ **Description:** An operating system process. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `process.pid` | number | Process identifier (PID). | `1234` | No | -| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | Conditional
See below | -| `process.executable.path` | string | 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 of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | Conditional
See below | -| `process.command` | string | 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 from `GetCommandLineW`. | `cmd/otelcol` | Conditional
See below | -| `process.command_line` | string | 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; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | Conditional
See below | -| `process.command_args` | string[] | 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 to `main`. | `cmd/otecol`
`--config=config.yaml` | Conditional
See below | +| `process.executable.name` | string | The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. | `otelcol` | See below | +| `process.executable.path` | string | 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 of `GetProcessImageFileNameW`. | `/usr/bin/cmd/otelcol` | See below | +| `process.command` | string | 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 from `GetCommandLineW`. | `cmd/otelcol` | See below | +| `process.command_line` | string | 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; use `process.command_args` instead. | `C:\cmd\otecol --config="my directory\config.yaml"` | See below | +| `process.command_args` | string[] | 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 to `main`. | `[cmd/otecol, --config=config.yaml]` | See below | | `process.owner` | string | The username of the user that owns the process. | `root` | No | @@ -51,7 +51,7 @@ At least one of `process.executable.name`, `process.executable.path`, `process.c **Description:** The single (language) runtime instance which is monitored. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `process.runtime.name` | string | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `OpenJDK Runtime Environment` | No | | `process.runtime.version` | string | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | No | diff --git a/specification/trace/semantic_conventions/database.md b/specification/trace/semantic_conventions/database.md index 045fed996e8..86f37c467a7 100644 --- a/specification/trace/semantic_conventions/database.md +++ b/specification/trace/semantic_conventions/database.md @@ -36,15 +36,15 @@ These attributes will usually be the same for all operations performed over the Some database systems may allow a connection to switch to a different `db.user`, for example, and other database systems may not even have the concept of a connection at all. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `db.system` | string | An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. | `other_sql` | Yes | | `db.connection_string` | string | The connection string used to connect to the database. It is recommended to remove embedded credentials. | `Server=(localdb)\v11.0;Integrated Security=true;` | No | -| `db.user` | string | Username for accessing the database. | `readonly_user`
`reporting_user` | No | -| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Conditional
See below. | -| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | Conditional
See below. | -| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional [1] | -| [`net.transport`](span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional [2] | +| `db.user` | string | Username for accessing the database. | `readonly_user`; `reporting_user` | No | +| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below. | +| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below. | +| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`; `8080`; `443` | Conditional [1] | +| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | Conditional [2] | **[1]:** Required if using a port other than the default port for this DBMS. @@ -126,9 +126,9 @@ When additional attributes are added that only apply to a specific DBMS, its ide ### Connection-level attributes for specific technologies -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `db.jdbc.driver_classname` | string | The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. | `org.postgresql.Driver`
`com.microsoft.sqlserver.jdbc.SQLServerDriver` | No | +| `db.jdbc.driver_classname` | string | The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. | `org.postgresql.Driver`; `com.microsoft.sqlserver.jdbc.SQLServerDriver` | No | | `db.mssql.instance_name` | string | The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. [1] | `MSSQLSERVER` | No | **[1]:** If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). @@ -140,11 +140,11 @@ These attributes may be different for each operation performed, even if the same Usually only one `db.name` will be used per connection though. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `db.name` | string | If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). [1] | `customers`
`main` | Conditional [2] | -| `db.statement` | string | The database statement being executed. [3] | `SELECT * FROM wuser_table`
`SET mykey "WuValue"` | Conditional
Required if applicable. | -| `db.operation` | string | The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. [4] | `findAndModify`
`HMSET`
`SELECT` | Conditional
Required, if `db.statement` is not applicable. | +| `db.name` | string | If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). [1] | `customers`; `main` | Conditional [2] | +| `db.statement` | string | The database statement being executed. [3] | `SELECT * FROM wuser_table`; `SET mykey "WuValue"` | Required if applicable. | +| `db.operation` | string | The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. [4] | `findAndModify`; `HMSET`; `SELECT` | Required, if `db.statement` is not applicable. | **[1]:** In some SQL databases, the database name to be used is called "schema name". @@ -168,12 +168,12 @@ For example, when retrieving a document, `db.operation` would be set to (literal ### Call-level attributes for specific technologies -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `db.hbase.namespace` | string | The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. | `default` | Yes | -| `db.redis.database_index` | number | The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. | `0`
`1`
`15` | Conditional [1] | -| `db.mongodb.collection` | string | The collection being accessed within the database stated in `db.name`. | `customers`
`products` | Yes | -| `db.sql.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [2] | `public.users`
`customers` | Conditional
Recommended if available. | +| `db.redis.database_index` | number | The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. | `0`; `1`; `15` | Conditional [1] | +| `db.mongodb.collection` | string | The collection being accessed within the database stated in `db.name`. | `customers`; `products` | Yes | +| `db.sql.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [2] | `public.users`; `customers` | Recommended if available. | **[1]:** Required, if other than the default database (`0`). @@ -185,14 +185,14 @@ For example, when retrieving a document, `db.operation` would be set to (literal Separated for clarity. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `db.cassandra.keyspace` | string | The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. | `mykeyspace` | Yes | | `db.cassandra.page_size` | number | The fetch size used for paging, i.e. how many rows will be returned at once. | `5000` | No | -| `db.cassandra.consistency_level` | string enum | The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). | `ALL` | No | -| `db.cassandra.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [1] | `mytable` | Conditional
Recommended if available. | +| `db.cassandra.consistency_level` | string | The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). | `ALL` | No | +| `db.cassandra.table` | string | The name of the primary table that the operation is acting upon, including the schema name (if applicable). [1] | `mytable` | Recommended if available. | | `db.cassandra.idempotence` | boolean | Whether or not the query is idempotent. | | No | -| `db.cassandra.speculative_execution_count` | number | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`
`2` | No | +| `db.cassandra.speculative_execution_count` | number | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`; `2` | No | | `db.cassandra.coordinator.id` | string | The ID of the coordinating node for a query. | `be13faa2-8574-4d71-926d-27f16cf8a7af` | No | | `db.cassandra.coordinator.dc` | string | The data center of the coordinating node for a query. | `us-west-2` | No | diff --git a/specification/trace/semantic_conventions/exceptions.md b/specification/trace/semantic_conventions/exceptions.md index 3aaad32d151..b7f996861cd 100644 --- a/specification/trace/semantic_conventions/exceptions.md +++ b/specification/trace/semantic_conventions/exceptions.md @@ -40,10 +40,10 @@ The table below indicates which attributes should be added to the `Event` and their types. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `exception.type` | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`
`OSError` | See below | -| `exception.message` | string | The exception message. | `Division by zero`
`Can't convert 'int' object to str implicitly` | See below | +| `exception.type` | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` | See below | +| `exception.message` | string | The exception message. | `Division by zero`; `Can't convert 'int' object to str implicitly` | See below | | `exception.stacktrace` | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | No | | `exception.escaped` | boolean | SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. [1] | | No | diff --git a/specification/trace/semantic_conventions/faas.md b/specification/trace/semantic_conventions/faas.md index ffb64c64a8e..d0646bff222 100644 --- a/specification/trace/semantic_conventions/faas.md +++ b/specification/trace/semantic_conventions/faas.md @@ -28,9 +28,9 @@ Span `name` should be set to the function name being executed. Depending on the If Spans following this convention are produced, a Resource of type `faas` MUST exist following the [Resource semantic convention](../../resource/semantic_conventions/faas.md#function-as-a-service). -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `faas.trigger` | string enum | Type of the trigger on which the function is executed. | `datasource` | Conditional [1] | +| `faas.trigger` | string | Type of the trigger on which the function is executed. | `datasource` | Conditional [1] | | `faas.execution` | string | The execution ID of the current function execution. | `af9d5aa4-a685-4c5f-a22b-444f80b3cc28` | No | **[1]:** On FaaS instances, faas.trigger MUST be set on incoming invocations. Clients invoking FaaS instances MUST set `faas.trigger` on outgoing invocations, if it is known to the client. This is, for example, not the case, when the transport layer is abstracted in a FaaS client framework without access to its configuration. @@ -80,7 +80,7 @@ This section describes incoming FaaS invocations as they are reported by the Faa For incoming FaaS spans, the span kind MUST be `Server`. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `faas.coldstart` | boolean | A boolean that is true if the serverless function is executed for the first time (aka cold-start). | | No | @@ -96,7 +96,7 @@ the corresponding [FaaS resource attributes][] and [Cloud resource attributes][] which the invoked FaaS instance reports about itself, if it's instrumented. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `faas.invoked_name` | string | The name of the invoked function. [1] | `my-function` | Yes | | `faas.invoked_provider` | string | The cloud provider of the invoked function. [2] | `aws` | Yes | @@ -132,12 +132,12 @@ A datasource function is triggered as a response to some data source operation s For `faas` spans with trigger `datasource`, it is recommended to set the following attributes. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `faas.document.collection` | string | The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. | `myBucketName`
`myDbName` | Yes | +| `faas.document.collection` | string | The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. | `myBucketName`; `myDbName` | Yes | | `faas.document.operation` | string | Describes the type of the operation that was performed on the data. | `insert` | Yes | | `faas.document.time` | string | A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). | `2020-01-23T13:47:06Z` | Yes | -| `faas.document.name` | string | The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. | `myFile.txt`
`myTableName` | No | +| `faas.document.name` | string | The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. | `myFile.txt`; `myTableName` | No | `faas.document.operation` MUST be one of the following or, if none of the listed values apply, a custom value: @@ -164,7 +164,7 @@ This way, it is possible to correlate each individual message with its execution A function is scheduled to be executed regularly. The following additional attributes are recommended. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `faas.time` | string | A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). | `2020-01-23T13:47:06Z` | Yes | | `faas.cron` | string | A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). | `0/5 * * * ? *` | No | diff --git a/specification/trace/semantic_conventions/http.md b/specification/trace/semantic_conventions/http.md index c9efe0b0231..22ad4b1dd57 100644 --- a/specification/trace/semantic_conventions/http.md +++ b/specification/trace/semantic_conventions/http.md @@ -50,14 +50,14 @@ Don't set the span status description if the reason can be inferred from `http.s ## Common Attributes -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `http.method` | string | HTTP request method. | `GET`
`POST`
`HEAD` | Yes | +| `http.method` | string | HTTP request method. | `GET`; `POST`; `HEAD` | Yes | | `http.url` | string | Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` | No | | `http.target` | string | The full request target as passed in a HTTP request line or equivalent. | `/path/12314/?q=ddds#123` | No | | `http.host` | string | The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is empty or not present, this attribute should be the same. | `www.example.org` | No | -| `http.scheme` | string | The URI scheme identifying the used protocol. | `http`
`https` | No | -| `http.status_code` | number | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditional
If and only if one was received/sent. | +| `http.scheme` | string | The URI scheme identifying the used protocol. | `http`; `https` | No | +| `http.status_code` | number | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | If and only if one was received/sent. | | `http.flavor` | string | Kind of HTTP protocol used [1] | `1.0` | No | | `http.user_agent` | string | Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | No | | `http.request_content_length` | number | The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. | `3495` | No | @@ -166,7 +166,7 @@ If the route does not include the application root, it SHOULD be prepended to th If the route cannot be determined, the `name` attribute MUST be set as defined in the general semantic conventions for HTTP. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `http.server_name` | string | The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). [1] | `example.com` | See below | | `http.route` | string | The matched route (path template). | `/users/:userID?` | No | diff --git a/specification/trace/semantic_conventions/messaging.md b/specification/trace/semantic_conventions/messaging.md index 4523014ffda..1987ed260ad 100644 --- a/specification/trace/semantic_conventions/messaging.md +++ b/specification/trace/semantic_conventions/messaging.md @@ -123,21 +123,21 @@ The following operations related to messages are defined for these semantic conv ## Messaging attributes -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `messaging.system` | string | A string identifying the messaging system. | `kafka`
`rabbitmq`
`activemq` | Yes | -| `messaging.destination` | string | The message destination name. This might be equal to the span name but is required nevertheless. | `MyQueue`
`MyTopic` | Yes | -| `messaging.destination_kind` | string enum | The kind of message destination | `queue` | Conditional [1] | -| `messaging.temp_destination` | boolean | A boolean that is true if the message destination is temporary. | | Conditional
If missing, it is assumed to be false. | -| `messaging.protocol` | string | The name of the transport protocol. | `AMQP`
`MQTT` | No | +| `messaging.system` | string | A string identifying the messaging system. | `kafka`; `rabbitmq`; `activemq` | Yes | +| `messaging.destination` | string | The message destination name. This might be equal to the span name but is required nevertheless. | `MyQueue`; `MyTopic` | Yes | +| `messaging.destination_kind` | string | The kind of message destination | `queue` | Conditional [1] | +| `messaging.temp_destination` | boolean | A boolean that is true if the message destination is temporary. | | If missing, it is assumed to be false. | +| `messaging.protocol` | string | The name of the transport protocol. | `AMQP`; `MQTT` | No | | `messaging.protocol_version` | string | The version of the transport protocol. | `0.9.1` | No | -| `messaging.url` | string | Connection string. | `tibjmsnaming://localhost:7222`
`https://queue.amazonaws.com/80398EXAMPLE/MyQueue` | No | +| `messaging.url` | string | Connection string. | `tibjmsnaming://localhost:7222`; `https://queue.amazonaws.com/80398EXAMPLE/MyQueue` | No | | `messaging.message_id` | string | A value used by the messaging system as an identifier for the message, represented as a string. | `452a7c7c7c7048c2f887f61572b18fc2` | No | | `messaging.conversation_id` | string | The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". | `MyConversationId` | No | | `messaging.message_payload_size_bytes` | number | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. | `2738` | No | | `messaging.message_payload_compressed_size_bytes` | number | The compressed size of the message payload in bytes. | `2048` | No | -| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Conditional
If available. | -| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. [2] | `example.com` | Conditional
If available. | +| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | If available. | +| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. [2] | `example.com` | If available. | **[1]:** Required only if the message destination is either a `queue` or `topic`. @@ -162,9 +162,9 @@ These attributes should be set to the broker to which the message is sent/from w For message consumers, the following additional attributes may be set: -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `messaging.operation` | string enum | A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. | `receive` | No | +| `messaging.operation` | string | A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. | `receive` | No | `messaging.operation` MUST be one of the following: @@ -194,13 +194,13 @@ The routing key MUST be provided to the attribute `messaging.rabbitmq.routing_ke For Apache Kafka, the following additional attributes are defined: -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `messaging.kafka.message_key` | string | Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. [1] | `myKey` | No | | `messaging.kafka.consumer_group` | string | Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. | `my-group` | No | | `messaging.kafka.client_id` | string | Client Id for the Consumer or Producer that is handling the message. | `client-5` | No | | `messaging.kafka.partition` | number | Partition the message is sent to. | `2` | No | -| `messaging.kafka.tombstone` | boolean | A boolean that is true if the message is a tombstone. | | Conditional
If missing, it is assumed to be false. | +| `messaging.kafka.tombstone` | boolean | A boolean that is true if the message is a tombstone. | | If missing, it is assumed to be false. | **[1]:** If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. diff --git a/specification/trace/semantic_conventions/rpc.md b/specification/trace/semantic_conventions/rpc.md index ff03ff95216..e710a948f2c 100644 --- a/specification/trace/semantic_conventions/rpc.md +++ b/specification/trace/semantic_conventions/rpc.md @@ -50,15 +50,15 @@ Examples of span names: ### Attributes -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `rpc.system` | string | A string identifying the remoting system. | `grpc`
`java_rmi`
`wcf` | Yes | -| `rpc.service` | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | Conditional
No, but recommended | -| `rpc.method` | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | Conditional
No, but recommended | +| `rpc.system` | string | A string identifying the remoting system. | `grpc`; `java_rmi`; `wcf` | Yes | +| `rpc.service` | string | The full name of the service being called, including its package name, if applicable. | `myservice.EchoService` | No, but recommended | +| `rpc.method` | string | The name of the method being called, must be equal to the $method part in the span name. | `exampleMethod` | No, but recommended | | [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | See below | | [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | See below | -| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`
`8080`
`443` | Conditional
See below | -| [`net.transport`](span-general.md) | string enum | Transport protocol used. See note below. | `IP.TCP` | Conditional
See below | +| [`net.peer.port`](span-general.md) | number | Remote port number. | `80`; `8080`; `443` | See below | +| [`net.transport`](span-general.md) | string | Transport protocol used. See note below. | `IP.TCP` | See below | **Additional attribute requirements:** At least one of the following sets of attributes is required: @@ -101,9 +101,9 @@ For remote procedure calls via [gRPC][], additional conventions are described in ### gRPC Attributes -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `rpc.grpc.status_code` | number enum | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`
`1`
`16` | Yes | +| `rpc.grpc.status_code` | number | The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. | `0`; `1`; `16` | Yes | `rpc.grpc.status_code` MUST be one of the following: diff --git a/specification/trace/semantic_conventions/span-general.md b/specification/trace/semantic_conventions/span-general.md index 1f637eec1fc..c6cc292682f 100644 --- a/specification/trace/semantic_conventions/span-general.md +++ b/specification/trace/semantic_conventions/span-general.md @@ -30,11 +30,11 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties
-| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| -| `net.transport` | string enum | Transport protocol used. See note below. | `IP.TCP` | No | +| `net.transport` | string | Transport protocol used. See note below. | `IP.TCP` | No | | `net.peer.ip` | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | No | -| `net.peer.port` | number | Remote port number. | `80`
`8080`
`443` | No | +| `net.peer.port` | number | Remote port number. | `80`; `8080`; `443` | No | | `net.peer.name` | string | Remote hostname or similar, see note below. | `example.com` | No | | `net.host.ip` | string | Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. | `192.168.0.1` | No | | `net.host.port` | number | Like `net.peer.port` but for the host port. | `35555` | No | @@ -81,7 +81,7 @@ Users can define what the name of a service is based on their particular semanti Instrumentations SHOULD provide a way for users to configure this name. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `peer.service` | string | The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. | `AuthTokenCache` | No | @@ -96,7 +96,7 @@ Examples of `peer.service` that users may specify: These attributes may be used for any operation with an authenticated and/or authorized enduser. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `enduser.id` | string | Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. | `username` | No | | `enduser.role` | string | Actual/assumed role the client is making the request under extracted from token or application security context. | `admin` | No | @@ -145,7 +145,7 @@ These attributes may be used for any operation to store information about a thread that started a span. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `thread.id` | number | Current "managed" thread ID (as opposed to OS thread ID). | `42` | No | | `thread.name` | string | Current thread name. | `main` | No | @@ -171,7 +171,7 @@ The attributes listed below allow to report this unit of code and therefore to p about the span. -| Attribute | Type | Description | Example | Required | +| Attribute | Type | Description | Examples | Required | |---|---|---|---|---| | `code.function` | string | The method or function name, or equivalent (usually rightmost part of the code unit's name). | `serveRequest` | No | | `code.namespace` | string | The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. | `com.example.MyHttpService` | No |