Skip to content

Commit 41f99a8

Browse files
author
Andrew Xue
committed
add first draft example
1 parent 46188b6 commit 41f99a8

File tree

1 file changed

+8
-8
lines changed
  • ext/opentelemetry-ext-cloud-monitoring/examples

1 file changed

+8
-8
lines changed

ext/opentelemetry-ext-cloud-monitoring/examples/metrics.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def _ghetto_export():
4747
# Perform post-exporting logic based on batcher configuration
4848
meter.batcher.finished_collection()
4949

50-
51-
requests_counter.add(25, staging_labels)
52-
double_counter.add(2.3, other_labels)
53-
_ghetto_export()
54-
time.sleep(3)
55-
requests_counter.add(20, staging_labels)
56-
double_counter.add(2.53, other_labels)
57-
_ghetto_export()
50+
for i in range(20):
51+
requests_counter.add(25, staging_labels)
52+
double_counter.add(2.3, other_labels)
53+
_ghetto_export()
54+
time.sleep(10)
55+
requests_counter.add(20, staging_labels)
56+
double_counter.add(2.53, other_labels)
57+
_ghetto_export()

0 commit comments

Comments
 (0)