-
Notifications
You must be signed in to change notification settings - Fork 893
/
faas.yaml
188 lines (182 loc) · 6.75 KB
/
faas.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
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.
- 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'