Skip to content

Commit

Permalink
Move metrics route to extension module
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed May 4, 2023
1 parent 62b7647 commit a2a3fb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion emmett_prometheus/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.3"
__version__ = "0.1.4"
4 changes: 3 additions & 1 deletion emmett_prometheus/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ def on_load(self):
self._pipe_ws = PrometheusWSPipe(self)

if self.config.auto_load:
self.app.route(
self.appmod = self.app.module(__name__, "emmett_prometheus")
self.appmod.route(
self.config.metrics_route_path,
name="metrics",
methods='get',
hostname=self.config.metrics_route_hostname,
output='bytes'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "emmett-prometheus"
version = "0.1.3"
version = "0.1.4"
description = "Prometheus extension for Emmett framework"
authors = ["Giovanni Barillari <[email protected]>"]
license = "BSD-3-Clause"
Expand Down

0 comments on commit a2a3fb9

Please sign in to comment.