opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

Include memory assigned to the lambda function as part of the trace

Open juanitosvq opened this issue 3 years ago • 1 comments

Hi, I noticed that the spec has an attribute faas.max_memory that describes the memory assigned to the lambda function: https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/faas/

I wasn't able to find that attribute in our traces when using the otel layer. I believe it would just be a matter of updating this: https://github.com/open-telemetry/opentelemetry-lambda/blob/main/python/src/otel/otel_sdk/otel-instrument#L130 to include AWS_LAMBDA_FUNCTION_MEMORY_SIZE, since this should already be available on runtime: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime

I'll be happy to open a PR if this makes sense.

Thanks!

juanitosvq avatar Jun 22 '22 15:06 juanitosvq

This issue was marked stale. It will be closed in 30 days without additional activity.

github-actions[bot] avatar Jun 30 '24 03:06 github-actions[bot]

Closed as inactive. Feel free to reopen if this issue is still relevant.

github-actions[bot] avatar Aug 25 '24 03:08 github-actions[bot]