Skip to content

Commit a1da396

Browse files
committed
fix: warning about metrics/dimensions in global scope
1 parent cf1dac5 commit a1da396

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/core/metrics.md

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ You can create metrics using `add_metric`, and you can create dimensions for all
104104
!!! note "Metrics overflow"
105105
CloudWatch EMF supports a max of 100 metrics per batch. Metrics utility will flush all metrics when adding the 100th metric. Subsequent metrics, e.g. 101th, will be aggregated into a new EMF object, for your convenience.
106106

107+
!!! warning "Do not create metrics or dimensions outside the handler"
108+
Metrics or dimensions added in the global scope will only be added during cold start. Disregard if you that's the intended behaviour.
107109

108110
### Adding default dimensions
109111

0 commit comments

Comments
 (0)