diff --git a/semantic_conventions/resource/faas.yaml b/semantic_conventions/resource/faas.yaml new file mode 100644 index 00000000000..4fe82168088 --- /dev/null +++ b/semantic_conventions/resource/faas.yaml @@ -0,0 +1,35 @@ +groups: + - id: faas_resource + prefix: faas + brief: > + A serverless instance. + attributes: + - id: name + type: string + required: always + brief: > + The name of the function being executed. + examples: ['my-function'] + - id: id + type: string + required: always + brief: > + The unique ID of the function being executed. + note: > + For example, in AWS Lambda this field corresponds to the + [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + value, in GCP to the URI of the resource, and in Azure to the + [FunctionDirectory](https://github.com/Azure/azure-functions-host/wiki/Retrieving-information-about-the-currently-running-function) + field. + examples: ['arn:aws:lambda:us-west-2:123456789012:function:my-function'] + - id: version + type: string + brief: > + The version string of the function being executed as defined in + [Version Attributes](https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions#version-attributes). + examples: ['2.0.0'] + - id: instance + type: string + brief: > + The execution environment ID as a string. + examples: ['my-function:instance-0001'] diff --git a/semantic_conventions/resource/host.yaml b/semantic_conventions/resource/host.yaml new file mode 100644 index 00000000000..386ab17f809 --- /dev/null +++ b/semantic_conventions/resource/host.yaml @@ -0,0 +1,39 @@ +groups: + - id: host + prefix: host + brief: > + A host is defined as a general computing instance. + attributes: + - id: id + type: string + brief: > + Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. + examples: ['opentelemetry-test'] + - id: name + type: string + brief: > + 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. + examples: ['opentelemetry-test'] + - id: type + type: string + brief: > + Type of host. For Cloud, this must be the machine type. + examples: ['n1-standard-1'] + - id: image.name + type: string + brief: > + Name of the VM image or OS install the host was instantiated from. + examples: ['infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'] + - id: image.id + type: string + brief: > + VM image ID. For Cloud, this value is from the provider. + examples: ['ami-07b06b442921831e5'] + - id: image.version + type: string + brief: > + The version string of the VM image as defined in + [Version Attributes](https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions#version-attributes). + examples: ['0.1'] diff --git a/specification/resource/semantic_conventions/faas.md b/specification/resource/semantic_conventions/faas.md index 6c0de741b86..563ed00a802 100644 --- a/specification/resource/semantic_conventions/faas.md +++ b/specification/resource/semantic_conventions/faas.md @@ -4,14 +4,15 @@ **Description:** A serverless instance. -| Label | Description | Example | Required | -|---|---|---|--| -| faas.name | The name of the function being executed. | `my-function` | Yes | -| faas.id | The unique name of the function being executed.
For example, in AWS Lambda this field corresponds to the [ARN] value, in GCP to the URI of the resource, and in Azure to the [FunctionDirectory] field. | `arn:aws:lambda:us-west-2:123456789012:function:my-function` | Yes | -| faas.version | The version string of the function being executed. | `2.0.0` | No | -| faas.instance | The execution environment ID as a string. | `my-function:instance-0001` | No | + +| 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 | +| `faas.version` | string | The version string of the function being executed as defined in [Version Attributes](https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions#version-attributes). | `2.0.0` | No | +| `faas.instance` | string | The execution environment ID as a string. | `my-function:instance-0001` | No | -Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-execution-and-instance). +**[1]:** For example, in AWS Lambda this field corresponds to the [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) value, in GCP to the URI of the resource, and in Azure to the [FunctionDirectory](https://github.com/Azure/azure-functions-host/wiki/Retrieving-information-about-the-currently-running-function) field. + -[ARN]:https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -[FunctionDirectory]: https://github.com/Azure/azure-functions-host/wiki/Retrieving-information-about-the-currently-running-function +Note: The resource attribute `faas.instance` differs from the span attribute `faas.execution`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-execution-and-instance). diff --git a/specification/resource/semantic_conventions/host.md b/specification/resource/semantic_conventions/host.md index bb68217d559..d93ead14063 100644 --- a/specification/resource/semantic_conventions/host.md +++ b/specification/resource/semantic_conventions/host.md @@ -4,11 +4,13 @@ **Description:** A host is defined as a general computing instance. -| Attribute | Description | Example | -|---|---|---| -| host.id | Unique host id.
For Cloud this must be the instance_id assigned by the cloud provider | `opentelemetry-test` | -| host.name | Name of the host.
On Unix systems, it may contain what the `hostname` command returns, or the fully qualified hostname, or another name specified by the user. | `opentelemetry-test` | -| host.type | Type of host.
For Cloud this must be the machine type.| `n1-standard-1` | -| host.image.name | Name of the VM image or OS install the host was instantiated from. | `infra-ami-eks-worker-node-7d4ec78312`, `CentOS-8-x86_64-1905` | -| host.image.id | VM image id. For Cloud, this value is from the provider. | `ami-07b06b442921831e5` | -| host.image.version | The version string of the VM image. | `0.1` | + +| 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.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](https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions#version-attributes). | `0.1` | No | +