View Source OpenTelemetry.SemConv.Incubating.FAASAttributes (OpenTelemetry.SemConv v1.27.0)

OpenTelemetry Semantic Conventions for FAAS attributes.

Summary

Types

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

The cloud provider of the invoked function.

Type of the trigger which caused this function invocation.

Functions

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

A string containing the schedule period as Cron Expression.

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.

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.

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

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

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

The invocation ID of the current function invocation.

The name of the invoked function.

The cloud provider of the invoked function.

The cloud region of the invoked function.

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

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

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

Type of the trigger which caused this function invocation.

The immutable version of the function being executed.

Types

Link to this type

faas_document_operation_values()

View Source
@type faas_document_operation_values() :: %{
  insert: :insert,
  edit: :edit,
  delete: :delete
}

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

Enum Values

  • :insert e - When a new object is created.
  • :edit e - When an object is modified.
  • :delete e - When an object is deleted.
Link to this type

faas_invoked_provider_values()

View Source
@type faas_invoked_provider_values() :: %{
  alibaba_cloud: :alibaba_cloud,
  aws: :aws,
  azure: :azure,
  gcp: :gcp,
  tencent_cloud: :tencent_cloud
}

The cloud provider of the invoked function.

Enum Values

  • :alibaba_cloud e - Alibaba Cloud
  • :aws e - Amazon Web Services
  • :azure e - Microsoft Azure
  • :gcp e - Google Cloud Platform
  • :tencent_cloud e - Tencent Cloud
@type faas_trigger_values() :: %{
  datasource: :datasource,
  http: :http,
  pubsub: :pubsub,
  timer: :timer,
  other: :other
}

Type of the trigger which caused this function invocation.

Enum Values

  • :datasource e - A response to some data source operation such as a database or filesystem read/write
  • :http e - To provide an answer to an inbound HTTP request
  • :pubsub e - A function is set to be executed when messages are sent to a messaging system
  • :timer e - A function is scheduled to be executed regularly
  • :other e - If none of the others apply

Functions

@spec faas_coldstart() :: :"faas.coldstart"

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

Value type

Value must be of type boolean().

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_coldstart()
:"faas.coldstart"
@spec faas_cron() :: :"faas.cron"

A string containing the schedule period as Cron Expression.

Value type

Value must be of type atom() | String.t().

Examples

0/5 * * * ? *
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_cron()
:"faas.cron"
Link to this function

faas_document_collection()

View Source
@spec faas_document_collection() :: :"faas.document.collection"

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.

Value type

Value must be of type atom() | String.t().

Examples

["myBucketName", "myDbName"]
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_collection()
:"faas.document.collection"
@spec faas_document_name() :: :"faas.document.name"

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.

Value type

Value must be of type atom() | String.t().

Examples

["myFile.txt", "myTableName"]
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_name()
:"faas.document.name"
Link to this function

faas_document_operation()

View Source
@spec faas_document_operation() :: :"faas.document.operation"

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

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation()
:"faas.document.operation"

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation_values().insert
:insert

iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_operation_values().insert}
%{:"faas.document.operation" => :insert}
Link to this function

faas_document_operation_values()

View Source
@spec faas_document_operation_values() :: faas_document_operation_values()
@spec faas_document_time() :: :"faas.document.time"

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

Value type

Value must be of type atom() | String.t().

Examples

2020-01-23T13:47:06Z
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_document_time()
:"faas.document.time"
@spec faas_instance() :: :"faas.instance"

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

Value type

Value must be of type atom() | String.t().

Notes

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

Examples

["2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de"]
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_instance()
:"faas.instance"
@spec faas_invocation_id() :: :"faas.invocation_id"

The invocation ID of the current function invocation.

Value type

Value must be of type atom() | String.t().

Examples

af9d5aa4-a685-4c5f-a22b-444f80b3cc28
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invocation_id()
:"faas.invocation_id"
@spec faas_invoked_name() :: :"faas.invoked_name"

The name of the invoked function.

Value type

Value must be of type atom() | String.t().

Notes

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

Examples

my-function
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_name()
:"faas.invoked_name"
@spec faas_invoked_provider() :: :"faas.invoked_provider"

The cloud provider of the invoked function.

Notes

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

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider()
:"faas.invoked_provider"

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider_values().alibaba_cloud
:alibaba_cloud

iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_provider_values().alibaba_cloud}
%{:"faas.invoked_provider" => :alibaba_cloud}
Link to this function

faas_invoked_provider_values()

View Source
@spec faas_invoked_provider_values() :: faas_invoked_provider_values()
@spec faas_invoked_region() :: :"faas.invoked_region"

The cloud region of the invoked function.

Value type

Value must be of type atom() | String.t().

Notes

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

Examples

eu-central-1
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_invoked_region()
:"faas.invoked_region"
@spec faas_max_memory() :: :"faas.max_memory"

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

Value type

Value must be of type integer().

Notes

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

134217728
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_max_memory()
:"faas.max_memory"
@spec faas_name() :: :"faas.name"

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

Value type

Value must be of type atom() | String.t().

Notes

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
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

["my-function", "myazurefunctionapp/some-function-name"]
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_name()
:"faas.name"
@spec faas_time() :: :"faas.time"

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

Value type

Value must be of type atom() | String.t().

Examples

2020-01-23T13:47:06Z
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_time()
:"faas.time"
@spec faas_trigger() :: :"faas.trigger"

Type of the trigger which caused this function invocation.

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger()
:"faas.trigger"

iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger_values().datasource
:datasource

iex> %{OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger() => OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_trigger_values().datasource}
%{:"faas.trigger" => :datasource}
@spec faas_trigger_values() :: faas_trigger_values()
@spec faas_version() :: :"faas.version"

The immutable version of the function being executed.

Value type

Value must be of type atom() | String.t().

Notes

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

["26", "pinkfroid-00002"]
iex> OpenTelemetry.SemConv.Incubating.FAASAttributes.faas_version()
:"faas.version"