Skip to content

Commit

Permalink
Change faas.max_memory units to Bytes instead of MB
Browse files Browse the repository at this point in the history
For better unit consistency with other the semantic conventions.
  • Loading branch information
tylerbenson committed Feb 8, 2023
1 parent 3c60aeb commit 0dbea99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions semantic_conventions/resource/faas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ groups:
- id: max_memory
type: int
brief: >
The amount of memory available to the serverless function in MiB.
The amount of memory available to the serverless function converted to Bytes.
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.
examples: 128
provides this information (multiplied by 1000000).
examples: 128000000
4 changes: 2 additions & 2 deletions specification/resource/semantic_conventions/faas.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ See also:
| `faas.id` | string | The unique ID of the single function that this runtime instance executes. [2] | `arn:aws:lambda:us-west-2:123456789012:function:my-function` | Recommended |
| `faas.version` | string | The immutable version of the function being executed. [3] | `26`; `pinkfroid-00002` | Recommended |
| `faas.instance` | string | The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. [4] | `2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de` | Recommended |
| `faas.max_memory` | int | The amount of memory available to the serverless function in MiB. [5] | `128` | Recommended |
| `faas.max_memory` | int | The amount of memory available to the serverless function in Bytes. [5] | `128000000` | Recommended |

**[1]:** This is the name of the function as configured/deployed on the FaaS
platform and is usually different from the name of the callback
Expand Down Expand Up @@ -68,7 +68,7 @@ The exact value to use for `faas.id` depends on the cloud provider:

**[4]:** * **AWS Lambda:** Use the (full) log stream name.

**[5]:** 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.
**[5]:** 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 (multiplied by 1000000).
<!-- endsemconv -->

Note: The resource attribute `faas.instance` differs from the span attribute `faas.invocation_id`. For more information see the [Semantic conventions for FaaS spans](../../trace/semantic_conventions/faas.md#difference-between-invocation-and-instance).
Expand Down

0 comments on commit 0dbea99

Please sign in to comment.