Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FaaS conventions: make faas.document.time and faas.time attributes recommended #2627

Merged
merged 3 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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

Expand Down
2 changes: 0 additions & 2 deletions semantic_conventions/trace/faas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions specification/trace/semantic_conventions/faas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- semconv faas_span.datasource -->
| 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.
Expand Down Expand Up @@ -208,7 +208,7 @@ A function is scheduled to be executed regularly. The following additional attri
<!-- semconv faas_span.timer -->
| 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 |
<!-- endsemconv -->

Expand Down