lib/opentelemetry/semantic_conventions/resource.rb in opentelemetry-semantic_conventions-1.4.0 vs lib/opentelemetry/semantic_conventions/resource.rb in opentelemetry-semantic_conventions-1.6.0
- old
+ new
@@ -11,15 +11,15 @@
CLOUD_PROVIDER = 'cloud.provider'
# The cloud account ID the resource is assigned to
CLOUD_ACCOUNT_ID = 'cloud.account.id'
- # The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations)
+ # The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations)
CLOUD_REGION = 'cloud.region'
# Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running
- # @note Availability zones are called "zones" on Google Cloud
+ # @note Availability zones are called "zones" on Alibaba Cloud and Google Cloud
CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'
# The cloud platform in use
# @note The prefix of the service SHOULD match the one specified in `cloud.provider`
CLOUD_PLATFORM = 'cloud.platform'
@@ -88,20 +88,44 @@
# The marketing name for the device model
# @note It's recommended this value represents a human readable version of the device model rather than a machine readable alternative
DEVICE_MODEL_NAME = 'device.model.name'
- # The name of the function being executed
+ # The name of the single function that this runtime instance executes
+ # @note 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`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes)
FAAS_NAME = 'faas.name'
- # The unique ID of the function being executed
- # @note For example, in AWS Lambda this field corresponds to the [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) value, in GCP to the URI of the resource, and in Azure to the [FunctionDirectory](https://github.com/Azure/azure-functions-host/wiki/Retrieving-information-about-the-currently-running-function) field
+ # The unique ID of the single function that this runtime instance executes
+ # @note Depending on the cloud provider, use:
+ #
+ # * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
+ # Take care not to use the "invoked ARN" directly but replace any
+ # [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple
+ # different aliases.
+ # * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)
+ # * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).
+ #
+ # On some providers, it may not be possible to determine the full ID at startup,
+ # which is why this field cannot be made required. For example, on AWS the account ID
+ # part of the ARN is not available without calling another AWS API
+ # which may be deemed too slow for a short-running lambda function.
+ # As an alternative, consider setting `faas.id` as a span attribute instead
FAAS_ID = 'faas.id'
- # The version string of the function being executed as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes)
+ # The immutable version of the function being executed
+ # @note Depending on the cloud provider and platform, use:
+ #
+ # * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
+ # (an integer represented as a decimal string).
+ # * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)
+ # (i.e., the function name plus the revision suffix).
+ # * **Google Cloud Functions:** The value of the
+ # [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
+ # * **Azure Functions:** Not applicable. Do not set this attribute
FAAS_VERSION = 'faas.version'
- # The execution environment ID as a string
+ # The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version
+ # @note * **AWS Lambda:** Use the (full) log stream name
FAAS_INSTANCE = 'faas.instance'
# The amount of memory available to the serverless function in MiB
# @note 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
FAAS_MAX_MEMORY = 'faas.max_memory'
\ No newline at end of file