Skip to content

Commit 3270276

Browse files
committed
add prometheus integration
1 parent 9d40f1f commit 3270276

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from flask import Flask, request, jsonify
2+
from prometheus_flask_exporter import PrometheusMetrics
23
import json
34
import random
45

56

67
app = Flask(__name__)
8+
metrics = PrometheusMetrics(app)
79

810

911
with open('data/data_tv.json', 'r') as f:

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
flask
1+
flask
2+
prometheus_flask_exporter

0 commit comments

Comments
 (0)