Repository navigation
fix(otel): report faas.max_memory in bytes - #1074
Merged
Merged
Conversation
ExecutionOtelPlugin set faas.max_memory on the Invocation span from AWS_LAMBDA_FUNCTION_MEMORY_SIZE as is, which Lambda gives in MiB. The semantic conventions define the attribute in bytes, so 1024 MiB was reported as 1024 instead of 1073741824. Multiply by 1024 * 1024, as the OpenTelemetry AWS Lambda resource detector does. Fixes aws#1053
Thanatos9404
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 21:22 — with
GitHub Actions
Inactive
zhongkechen
approved these changes
Oct 23, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Fixes #1053
Description
The Execution view set
faas.max_memoryon the Invocation span straight fromAWS_LAMBDA_FUNCTION_MEMORY_SIZE, which Lambda gives in MiB. The semantic conventions define the attribute in bytes, so a 1024 MiB function reported 1024. It now multiplies by 1024 * 1024, as the AWS Lambda resource detector does, and the same inputs still produce or skip the attribute. The README and CHANGELOG note the unit.Demo/Screenshots
N/A
Checklist
Testing
Unit Tests
Yes. 128, 1024 and 10240 MiB fail on
mainand pass here. An unset or invalid value, and the global provider, still get no attribute.Integration Tests
No, the unit tests cover it.
Examples
Not applicable.