awslabs / awslabs/aws-embedded-metrics-java
@requestId is not logged for metrics log line when using in Lambda
- Dominant language
- Java
- Stars
- 48
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am using this library in my Lambda to log custom metrics. When using it, I observe for the EMF log line it will add those Lambda autogenerated fields like @ingestionTime, @logStream, @message, @timestamp and etc but `@requsetId` is missing from it. Other normal log lines generated from code will always have @requestId.
The problem caused is when we use log Insight to search for all logs of a specific Lambda invocation by `filter @requestId = "something"`, with @requestId missed on this line, it won't show up in search result.
See the picture for details.
**@requestId is missed**

**when searching logs with @requestId, EMF log line is not included due to missing @requestId**

Do we think this is something we can fix?
Contributor guide
Assessment
This issue has not been assessed yet.