Added CRUD metrics
All checks were successful
Amarillo/amarillo-gitea/amarillo-metrics/pipeline/head This commit looks good
All checks were successful
Amarillo/amarillo-gitea/amarillo-metrics/pipeline/head This commit looks good
This commit is contained in:
parent
0f1441163a
commit
e0f9abf4ca
|
|
@ -21,8 +21,8 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
security = HTTPBasic()
|
security = HTTPBasic()
|
||||||
|
|
||||||
gtfs_download_counter = Counter("gtfs_downloads", "How many times GTFS data was downloaded")
|
gtfs_download_counter = Counter("amarillo_gtfs_downloads", "How many times GTFS data was downloaded")
|
||||||
grfs_download_counter = Counter("grfs_downloads", "How many times GRFS data was downloaded")
|
grfs_download_counter = Counter("amarillo_grfs_downloads", "How many times GRFS data was downloaded")
|
||||||
|
|
||||||
def increment_gtfs_download_counter():
|
def increment_gtfs_download_counter():
|
||||||
gtfs_download_counter.inc()
|
gtfs_download_counter.inc()
|
||||||
|
|
@ -30,6 +30,11 @@ def increment_gtfs_download_counter():
|
||||||
def increment_grfs_download_counter():
|
def increment_grfs_download_counter():
|
||||||
grfs_download_counter.inc()
|
grfs_download_counter.inc()
|
||||||
|
|
||||||
|
trips_created_counter = Counter("amarillo_trips_created", "How many trips have been created")
|
||||||
|
trips_updated_counter = Counter("amarillo_trips_updated", "How many existing trips have been updated")
|
||||||
|
trips_deleted_counter = Counter("amarillo_trips_deleted", "How many trips have been deleted")
|
||||||
|
|
||||||
|
|
||||||
def amarillo_trips_number_total() -> Callable[[Info], None]:
|
def amarillo_trips_number_total() -> Callable[[Info], None]:
|
||||||
METRIC = Gauge("amarillo_trips_number_total", "Total number of trips.")
|
METRIC = Gauge("amarillo_trips_number_total", "Total number of trips.")
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue