Skip to content

Commit

Permalink
add UWsgiPrometheusMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jawadqur committed May 6, 2024
1 parent 853130b commit 2b7bd8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions fence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def app_init(
)
app_sessions(app)
app_register_blueprints(app)
try:
metrics = UWsgiPrometheusMetrics(app, path=None)
metrics.start_http_server(9090)
except:
logger.error("Failed to start metrics server")
server.init_app(app, query_client=query_client)


Expand Down
5 changes: 0 additions & 5 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,4 @@

app_init(app, config_path=args.config_path, config_file_name=args.config_file_name)

try:
metrics = UWsgiPrometheusMetrics(app, path=None)
metrics.start_http_server(9090)
except:
logger.error("Failed to start metrics server")
app.run(debug=False, port=8000)

0 comments on commit 2b7bd8f

Please sign in to comment.