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).
+ */
public static final AttributeKey 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.
+ * 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.
*/
public static final AttributeKey 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.
*/
public static final AttributeKey Note: * **AWS Lambda:** Use the (full) log stream name.
+ */
public static final AttributeKey Note: This may be different from `faas.id` if an alias is involved.
+ */
+ public static final AttributeKey Note: This is the logical name of the service from the RPC interface perspective, which can
+ * be different from the name of any implementing class. The `code.namespace` attribute may be
+ * used to store the latter (despite the attribute name, it may include a class name; e.g., class
+ * with method actually executing the call on the server side, RPC client stub class on the client
+ * side).
+ */
public static final AttributeKey Note: This is the logical name of the method from the RPC interface perspective, which can
+ * be different from the name of any implementing method/function. The `code.function` attribute
+ * may be used to store the latter (e.g., method actually executing the call on the server side,
+ * RPC client stub method on the client side).
+ */
public static final AttributeKey