awslabs / awslabs/aws-embedded-metrics-python
Enable customization of default dimensions and properties
- Dominant language
- Python
- Stars
- 231
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Log records by default already contain several dimensions ("LogGroup", "ServiceName"and "ServiceType") and properties (in case of the AWS Lambda environment "executionEnvironment", "memorySize", "functionVersion", "logStreamId" and "traceId"). While I believe that these dimensions and properties are great defaults, they make resulting log records already pretty large. Especially for applications which log many metrics, resulting in a huge number of log records, that might result in higher than necessary cost for CloudWatch Logs, if these dimensions and properties aren't valued.
While it's currently possible to use `MetricsLogger().set_dimensions()` to remove the default dimensions on a per-scope basis, I haven't found a similar way for properties. Also the need to replace the defaults per metrics scope is pretty repetitive, so I'd prefer a global option to customize the default dimensions and properties instead.
Contributor guide
Assessment
This issue has not been assessed yet.