190 lines
6.8 KiB
YAML
190 lines
6.8 KiB
YAML
groups:
|
|
- id: faas_span
|
|
prefix: faas
|
|
brief: >
|
|
This semantic convention describes an instance of a function that
|
|
runs without provisioning or managing of servers (also known as
|
|
serverless functions or Function as a Service (FaaS)) with spans.
|
|
attributes:
|
|
- id: trigger
|
|
required:
|
|
conditional: >
|
|
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.
|
|
brief: 'Type of the trigger on which the function is executed.'
|
|
type:
|
|
allow_custom_values: false
|
|
members:
|
|
- id: datasource
|
|
value: 'datasource'
|
|
brief: 'A response to some data source operation such as a database or filesystem read/write.'
|
|
- id: http
|
|
value: 'http'
|
|
brief: 'To provide an answer to an inbound HTTP request'
|
|
- id: pubsub
|
|
value: 'pubsub'
|
|
brief: 'A function is set to be executed when messages are sent to a messaging system.'
|
|
- id: timer
|
|
value: 'timer'
|
|
brief: 'A function is scheduled to be executed regularly.'
|
|
- id: other
|
|
value: 'other'
|
|
brief: 'If none of the others apply'
|
|
- id: execution
|
|
type: string
|
|
brief: 'The execution ID of the current function execution.'
|
|
examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
|
|
|
|
- id: faas_span.datasource
|
|
prefix: faas.document
|
|
extends: faas_span
|
|
brief: >
|
|
Semantic Convention for FaaS triggered as a response to some data
|
|
source operation such as a database or filesystem read/write.
|
|
attributes:
|
|
- id: collection
|
|
type: string
|
|
required: always
|
|
brief: >
|
|
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.
|
|
examples: ['myBucketName', 'myDbName']
|
|
- id: operation
|
|
required: always
|
|
type:
|
|
allow_custom_values: true
|
|
members:
|
|
- id: insert
|
|
value: 'insert'
|
|
brief: 'When a new object is created.'
|
|
- id: edit
|
|
value: 'edit'
|
|
brief: 'When an object is modified.'
|
|
- id: delete
|
|
value: 'delete'
|
|
brief: 'When an object is deleted.'
|
|
brief: 'Describes the type of the operation that was performed on the data.'
|
|
- id: time
|
|
type: string
|
|
required: always
|
|
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)
|
|
format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
|
|
examples: "2020-01-23T13:47:06Z"
|
|
- id: name
|
|
type: string
|
|
brief: >
|
|
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.
|
|
examples: ["myFile.txt", "myTableName"]
|
|
|
|
- id: faas_span.http
|
|
extends: faas_span
|
|
brief: >
|
|
Semantic Convention for FaaS triggered as a response to some data
|
|
source operation such as a database or filesystem read/write.
|
|
constraints:
|
|
- include: http.server
|
|
|
|
- id: faas_span.pubsub
|
|
extends: faas_span
|
|
brief: >
|
|
Semantic Convention for FaaS set to be executed when messages are
|
|
sent to a messaging system.
|
|
constraints:
|
|
- include: messaging
|
|
|
|
- id: faas_span.timer
|
|
extends: faas_span
|
|
prefix: faas
|
|
brief: >
|
|
Semantic Convention for FaaS scheduled to be executed regularly.
|
|
attributes:
|
|
- id: time
|
|
type: string
|
|
required: always
|
|
brief: >
|
|
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).
|
|
examples: "2020-01-23T13:47:06Z"
|
|
- id: cron
|
|
type: string
|
|
brief: >
|
|
A string containing the schedule period as
|
|
[Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
|
|
examples: "0/5 * * * ? *"
|
|
|
|
- id: faas_span.in
|
|
extends: faas_span
|
|
span_kind: server
|
|
prefix: faas
|
|
brief: >
|
|
Contains additional attributes for incoming FaaS spans.
|
|
attributes:
|
|
- id: coldstart
|
|
type: boolean
|
|
brief: >
|
|
A boolean that is true if the serverless function is executed for the
|
|
first time (aka cold-start).
|
|
|
|
- id: faas_span.out
|
|
extends: faas_span
|
|
span_kind: client
|
|
prefix: faas
|
|
brief: >
|
|
Contains additional attributes for outgoing FaaS spans.
|
|
attributes:
|
|
- id: invoked_name
|
|
type: string
|
|
required: always
|
|
brief: >
|
|
The name of the invoked function.
|
|
note: >
|
|
SHOULD be equal to the `faas.name` resource attribute of the
|
|
invoked function.
|
|
examples: 'my-function'
|
|
- id: invoked_provider
|
|
type:
|
|
allow_custom_values: true
|
|
members:
|
|
- id: AWS
|
|
value: 'aws'
|
|
brief: 'Amazon Web Services'
|
|
- id: Azure
|
|
value: 'azure'
|
|
brief: 'Microsoft Azure'
|
|
- id: GCP
|
|
value: 'gcp'
|
|
brief: 'Google Cloud Platform'
|
|
required: always
|
|
brief: >
|
|
The cloud provider of the invoked function.
|
|
note: >
|
|
SHOULD be equal to the `cloud.provider` resource attribute of the
|
|
invoked function.
|
|
examples: 'aws'
|
|
- id: invoked_region
|
|
type: string
|
|
required:
|
|
conditional: >
|
|
For some cloud providers, like AWS or GCP, the region in which a
|
|
function is hosted is essential to uniquely identify the function
|
|
and also part of its endpoint. Since it's part of the endpoint
|
|
being called, the region is always known to clients. In these cases,
|
|
`faas.invoked_region` MUST be set accordingly. If the region is
|
|
unknown to the client or not required for identifying the invoked
|
|
function, setting `faas.invoked_region` is optional.
|
|
brief: >
|
|
The cloud region of the invoked function.
|
|
note: >
|
|
SHOULD be equal to the `cloud.region` resource attribute of the
|
|
invoked function.
|
|
examples: 'eu-central-1'
|