You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/metrics.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,9 @@ If you're new to Amazon CloudWatch, there are two terminologies you must be awar
20
20
21
21
***Namespace**. It's the highest level container that will group multiple metrics from multiple services for a given application, for example `ServerlessEcommerce`.
22
22
***Dimensions**. Metrics metadata in key-value format. They help you slice and dice metrics visualization, for example `ColdStart` metric by Payment `service`.
23
+
***Metric**. It's the name of the metric, for example: `SuccessfulBooking` or `UpdatedBooking`.
24
+
***Unit**. It's a value representing the unit of measure for the corresponding metric, for example: `Count` or `Seconds`.
25
+
***Resolution**. It's a value representing the storage resolution for the corresponding metric. Metrics can be either Standard or High resolution. Read more [here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics).
23
26
24
27
<figure>
25
28
<imgsrc="../../media/metrics_terminology.png" />
@@ -78,6 +81,22 @@ You can create metrics using `add_metric`, and you can create dimensions for all
78
81
???+ warning "Warning: Do not create metrics or dimensions outside the handler"
79
82
Metrics or dimensions added in the global scope will only be added during cold start. Disregard if you that's the intended behavior.
80
83
84
+
### Adding high-resolution metrics
85
+
86
+
You can create [high-resolution metrics](https://aws.amazon.com/pt/about-aws/whats-new/2023/02/amazon-cloudwatch-high-resolution-metric-extraction-structured-logs/) passing `resolution` parameter to `add_metric`.
87
+
88
+
???+ tip "High-resolution metrics - when is it useful?"
89
+
High-resolution metrics are data with a granularity of one second and are very useful in several situations such as telemetry, time series, real-time incident management, and others.
`MetricResolution` enum facilitates finding a supported metric resolution by CloudWatch. Alternatively, you can pass the values 1 or 60 (must be one of them) as an integer _e.g. `resolution=1`_.
99
+
81
100
### Adding multi-value metrics
82
101
83
102
You can call `add_metric()` with the same metric name multiple times. The values will be grouped together in a list.
0 commit comments