Metrics
Business metrics and KPIs can drive your business forward towards success.
Metrics consist of a key and a value; A value can be a number, percentage, rate, or any other unit. Typical metrics are the number of sessions, users, error rate, number of views, etc.
The Metrics utility creates custom metrics asynchronously by logging metrics to standard output following Amazon CloudWatch Embedded Metric Format (EMF).
These metrics can be visualized through Amazon CloudWatch Console.
Key features¶
- Aggregate up to 100 metrics using a single CloudWatch EMF object (large JSON blob)
- Validate against common metric definitions mistakes (metric unit, values, max dimensions, max metrics, etc)
- Metrics are created asynchronously by CloudWatch service, no custom stacks needed
Usage in Handler¶
my_handler.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Blog Reference¶
Read more about the importance of the business KPis and metrics in my blog. Click HERE
More Details¶
You can find more information at the official documentation.
Go to https://docs.powertools.aws.dev/lambda-python/latest/core/metrics/