From 05d8c0b8bf2e98e0e16f215fe74fb29a66c8e5c7 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 28 Jun 2022 07:38:13 -0700 Subject: [PATCH] FaaS conventions: make faas.document.time and faas.time attributes recommended (#2627) --- CHANGELOG.md | 2 ++ semantic_conventions/trace/faas.yaml | 2 -- specification/trace/semantic_conventions/faas.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f60d59a491d..cd7386f4691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ release. ([#2456](https://github.com/open-telemetry/opentelemetry-specification/pull/2456)) - Change `cloudevents.event_spec_version` and `cloudevents.event_type` level from `required` to `recommended` ([#2618](https://github.com/open-telemetry/opentelemetry-specification/pull/2618)) +- Change `faas.document.time` and `faas.time` level from `required` to `recommended` + ([#2627](https://github.com/open-telemetry/opentelemetry-specification/pull/2627)) ### Compatibility diff --git a/semantic_conventions/trace/faas.yaml b/semantic_conventions/trace/faas.yaml index 6dc7bd44196..c9fbd078d94 100644 --- a/semantic_conventions/trace/faas.yaml +++ b/semantic_conventions/trace/faas.yaml @@ -73,7 +73,6 @@ groups: brief: 'Describes the type of the operation that was performed on the data.' - id: time type: string - requirement_level: required brief: > 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) @@ -111,7 +110,6 @@ groups: attributes: - id: time type: string - requirement_level: required brief: > A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) diff --git a/specification/trace/semantic_conventions/faas.md b/specification/trace/semantic_conventions/faas.md index f6b6c65f172..5434ce2d99e 100644 --- a/specification/trace/semantic_conventions/faas.md +++ b/specification/trace/semantic_conventions/faas.md @@ -171,14 +171,14 @@ This section describes how to handle the span creation and additional attributes ### Datasource A datasource function is triggered as a response to some data source operation such as a database or filesystem read/write. -For `faas` spans with trigger `datasource`, it is recommended to set the following attributes. +FaaS instrumentations that produce `faas` spans with trigger `datasource`, SHOULD use the following set of attributes. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `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` | Required | | `faas.document.operation` | string | Describes the type of the operation that was performed on the data. | `insert` | Required | -| `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` | Required | +| `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` | Recommended | | `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` | Recommended | `faas.document.operation` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used. @@ -208,7 +208,7 @@ A function is scheduled to be executed regularly. The following additional attri | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `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` | 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` | Recommended | | `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 * * * ? *` | Recommended |