elastic / elastic/apm-aws-lambda

Function logs can be reported without `faas.execution` field set

Open
#335 0 comments 0 reactions 0 assignees View on GitHub
aws-λ-extension bug
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)**:
Screenshot 2022-10-20 at 1 03 36 PM
^ Snapshot showing missing `faas.execution` in logs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.