Module: OpenTelemetry::SemConv::Incubating::FAAS

Defined in:
lib/opentelemetry/semconv/incubating/faas/metrics.rb,
lib/opentelemetry/semconv/incubating/faas/attributes.rb

Metrics Names collapse

FAAS_COLDSTARTS =
Note:

Stability Level: development

Number of invocation cold starts

'faas.coldstarts'
FAAS_CPU_USAGE =
Note:

Stability Level: development

Distribution of CPU usage per invocation

'faas.cpu_usage'
FAAS_ERRORS =
Note:

Stability Level: development

Number of invocation errors

'faas.errors'
FAAS_INIT_DURATION =
Note:

Stability Level: development

Measures the duration of the function’s initialization, such as a cold start

'faas.init_duration'
FAAS_INVOCATIONS =
Note:

Stability Level: development

Number of successful invocations

'faas.invocations'
FAAS_INVOKE_DURATION =
Note:

Stability Level: development

Measures the duration of the function’s logic execution

'faas.invoke_duration'
FAAS_MEM_USAGE =
Note:

Stability Level: development

Distribution of max memory usage per invocation

'faas.mem_usage'
FAAS_NET_IO =
Note:

Stability Level: development

Distribution of net I/O usage per invocation

'faas.net_io'
FAAS_TIMEOUTS =
Note:

Stability Level: development

Number of invocation timeouts

'faas.timeouts'

Attribute Names collapse

FAAS_COLDSTART =
Note:

Stability Level: development

A boolean that is true if the serverless function is executed for the first time (aka cold-start).

'faas.coldstart'
FAAS_CRON =
Note:

Stability Level: development

A string containing the schedule period as Cron Expression.

Examples:

Sample Values

0/5 * * * ? *
'faas.cron'
FAAS_DOCUMENT_COLLECTION =
Note:

Stability Level: development

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:

Sample Values

myBucketName
myDbName
'faas.document.collection'
FAAS_DOCUMENT_NAME =
Note:

Stability Level: development

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:

Sample Values

myFile.txt
myTableName
'faas.document.name'
FAAS_DOCUMENT_OPERATION =
Note:

Stability Level: development

Describes the type of the operation that was performed on the data.

'faas.document.operation'
FAAS_DOCUMENT_TIME =
Note:

Stability Level: development

A string containing the time when the data was accessed in the ISO 8601 format expressed in UTC.

Examples:

Sample Values

2020-01-23T13:47:06Z
'faas.document.time'
FAAS_INSTANCE =
Note:

Stability Level: development

The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.

  • AWS Lambda: Use the (full) log stream name.

Examples:

Sample Values

2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de
'faas.instance'
FAAS_INVOCATION_ID =
Note:

Stability Level: development

The invocation ID of the current function invocation.

Examples:

Sample Values

af9d5aa4-a685-4c5f-a22b-444f80b3cc28
'faas.invocation_id'
FAAS_INVOKED_NAME =
Note:

Stability Level: development

The name of the invoked function.

SHOULD be equal to the faas.name resource attribute of the invoked function.

Examples:

Sample Values

my-function
'faas.invoked_name'
FAAS_INVOKED_PROVIDER =
Note:

Stability Level: development

The cloud provider of the invoked function.

SHOULD be equal to the cloud.provider resource attribute of the invoked function.

'faas.invoked_provider'
FAAS_INVOKED_REGION =
Note:

Stability Level: development

The cloud region of the invoked function.

SHOULD be equal to the cloud.region resource attribute of the invoked function.

Examples:

Sample Values

eu-central-1
'faas.invoked_region'
FAAS_MAX_MEMORY =
Note:

Stability Level: development

The amount of memory available to the serverless function converted to Bytes.

It’s recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this information (which must be multiplied by 1,048,576).

Examples:

Sample Values

134217728
'faas.max_memory'
FAAS_NAME =
Note:

Stability Level: development

The name of the single function that this runtime instance executes.

This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the code.namespace/code.function.name span attributes).

For some cloud providers, the above definition is ambiguous. The following definition of function name MUST be used for this attribute (and consequently the span name) for the listed cloud providers/products:

  • Azure: The full name <FUNCAPP>/<FUNC>, i.e., function app name followed by a forward slash followed by the function name (this form can also be seen in the resource JSON for the function). This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share a TracerProvider (see also the cloud.resource_id attribute).

Examples:

Sample Values

my-function
myazurefunctionapp/some-function-name
'faas.name'
FAAS_TIME =
Note:

Stability Level: development

A string containing the function invocation time in the ISO 8601 format expressed in UTC.

Examples:

Sample Values

2020-01-23T13:47:06Z
'faas.time'
FAAS_TRIGGER =
Note:

Stability Level: development

Type of the trigger which caused this function invocation.

'faas.trigger'
FAAS_VERSION =
Note:

Stability Level: development

The immutable version of the function being executed.

Depending on the cloud provider and platform, use:

  • AWS Lambda: The function version (an integer represented as a decimal string).
  • Google Cloud Run (Services): The revision (i.e., the function name plus the revision suffix).
  • Google Cloud Functions: The value of the K_REVISION environment variable.
  • Azure Functions: Not applicable. Do not set this attribute.

Examples:

Sample Values

26
pinkfroid-00002
'faas.version'