elastic / elastic/apm-aws-lambda
Function logs can be reported without `faas.execution` field set
- Dominant language
- Go
- Stars
- 20
- Forks
- 36
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 3
Description
**APM AWS Lambda extension version** (`main`):
**Describe the bug**
It is possible that function logs are reported without the `faas.execution` field set since the current code assumes that both `platform.start` and `function` logs for a given invocation will be reported in the same batch ([relevant code](https://github.com/elastic/apm-aws-lambda/blob/ea8baf48e6b0665bc251520606ec4629a00208b2/logsapi/event.go#L67-L70)).
**To Reproduce**
Steps to reproduce the behavior:
1. Run a lambda function generating function logs with the latest version of extension (built from main).
2. Invoke the function a bunch of times.
3. Observe the missing `faas.execution` field on Kibana for some logs.
**Expected behavior**
All logs should have `faas.execution` set. This being said, it is not always possible to have `faas.execution` especially if the `platform.start` and `function` logs are delivered to two separate instances which _I think_ should be possible.
**Provide logs (if relevant)**:
^ Snapshot showing missing `faas.execution` in logs.
Contributor guide
Assessment
This issue has not been assessed yet.