Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fca8e3e

Browse files
committed
Introduce intentional exception
1 parent ae62753 commit fca8e3e

File tree

1 file changed

+3
-0
lines changed
  • localstack-core/localstack/utils/analytics/metrics

1 file changed

+3
-0
lines changed

‎localstack-core/localstack/utils/analytics/metrics/publisher.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def publish_metrics() -> None:
2121
return
2222

2323
collected_metrics = MetricRegistry().collect()
24+
# TODO: remove intentional debug exception used to expose places where metrics are sent unintentionally
25+
raise Exception(f"METRICS_WOULD_BE_PUBLISHED_BUT_SHOULD_NOT. Metrics: {collected_metrics}") # noqa
26+
2427
if not collected_metrics.payload: # Skip publishing if no metrics remain after filtering
2528
return
2629

0 commit comments

Comments
 (0)