8000 Add exporter registration step in OpenCensus Stats quick start (#2254) · niralkk/python-docs-samples@722503a · GitHub
[go: up one dir, main page]

Skip to content

Commit 722503a

Browse files
ymotongpoogguuss
authored andcommitted
Add exporter registration step in OpenCensus Stats quick start (GoogleCloudPlatform#2254)
1 parent 599d096 commit 722503a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opencensus/metrics_quickstart.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def main():
5656
print('Exporting stats to project "{}"'
5757
.format(exporter.options.project_id))
5858

59+
# Register exporter to the view manager.
60+
stats.stats.view_manager.register_exporter(exporter)
61+
5962
# Record 100 fake latency values between 0 and 5 seconds.
6063
for num in range(100):
6164
ms = random() * 5 * 1000

0 commit comments

Comments
 (0)
0