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
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ You can use add default dimensions to your metrics by passing them as parameters
115
115
116
116
* in the constructor
117
117
* in the Middy middleware
118
-
* using the setDefaultDimensions` method
118
+
* using the `setDefaultDimensions` method
119
119
* in the decorator
120
120
121
121
If you'd like to remove them at some point, you can use `clearDefaultDimensions` method.
@@ -138,7 +138,7 @@ See examples below:
138
138
}
139
139
```
140
140
141
-
=== "logMetrics middleware"
141
+
=== "Middy middleware"
142
142
143
143
```typescript hl_lines="5"
144
144
import { Metrics, MetricUnits, logMetrics } from '@aws-lambda-powertools/metrics';
@@ -209,7 +209,7 @@ If you do not the middleware or decorator, you have to flush your metrics manual
209
209
* Metric units must be [supported by CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html)
210
210
211
211
212
-
#### Using a middleware
212
+
#### Using Middy middleware
213
213
214
214
See below an example of how to automatically flush metrics with the Middy-compatible `logMetrics` middleware.
215
215
@@ -257,7 +257,7 @@ See below an example of how to automatically flush metrics with the Middy-compat
257
257
}
258
258
```
259
259
260
-
#### Using a class decorator
260
+
#### Using the class decorator
261
261
262
262
!!! info
263
263
Decorators can only be attached to a class declaration, method, accessor, property, or parameter. Therefore, if you prefer to write your handler as a standard function rather than a Class method, check the [middleware](#using-a-middleware) or [manual](#manually) method sections instead.
@@ -312,7 +312,7 @@ export class MyFunction {
312
312
313
313
#### Manually
314
314
315
-
If you wish to do so, you can manually flush metrics with `purgeStoredMetrics` and clear metrics as follows:
315
+
You can manually flush the metrics with `purgeStoredMetrics` as follows:
316
316
317
317
!!! warning
318
318
Metrics, dimensions and namespace validation still applies.
0 commit comments