diff --git a/tutorial/content/labs/instrumentation/manual/metrics/index.md b/tutorial/content/labs/instrumentation/manual/metrics/index.md index 35371d6..bdd1060 100644 --- a/tutorial/content/labs/instrumentation/manual/metrics/index.md +++ b/tutorial/content/labs/instrumentation/manual/metrics/index.md @@ -149,7 +149,10 @@ from metric_utils import create_meter # global variables app = Flask(__name__) -meter = create_meter("app.py", "0.1") + +if __name__ == "__main__": + # setup metrics + meter = create_meter("app.py", "0.1") ``` Finally, open `app.py` and import `create_meter`. @@ -783,4 +786,4 @@ As a result, the Prometheus server tries to bind to a port a second time, which To fix this, set the debug parameter to False. Start the app and open [localhost:8000](localhost:8000) in your browser. You should now see the metrics being exported in Prometheus text-based exposition format. ---> \ No newline at end of file +-->