1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/db
Gastón Fournier 2979f21631
feat: expose number of registered applications metric (#2692)
## About the changes
This metric will expose an aggregated view of how many client
applications are registered in Unleash. Since applications are ephemeral
we are exposing this metric in different time windows based on when the
application was last seen.

The caveat is that we issue a database query for each new range we want
to add. Hopefully, this should not be a problem because:
a) the amount of ranges we'd expose is small and unlikely to grow
b) this is currently updated at startup time and even if we update it on
a scheduled basis the refresh rate will be rather sparse

## Sample data
This is how metrics will look like
```
# HELP client_apps_total Number of registered client apps aggregated by range by last seen
# TYPE client_apps_total gauge
client_apps_total{range="allTime"} 3
client_apps_total{range="30d"} 3
client_apps_total{range="7d"} 2
```
2022-12-16 11:16:51 +00:00
..
access-store.ts Add possibility to soft delete users (#2497) 2022-11-23 09:30:54 +02:00
addon-store.ts fix: add projects and environments field to addon select 2022-07-12 14:32:24 +02:00
api-token-store.ts feat: add last seen column to token table (#2520) 2022-11-30 08:07:13 +02:00
client-applications-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
client-instance-store.ts feat: expose number of registered applications metric (#2692) 2022-12-16 11:16:51 +00:00
client-metrics-store-v2.ts refactor: batch feature metric inserts (#1928) 2022-08-19 10:38:26 +02:00
context-field-store.ts Feat/stats service (#2211) 2022-10-25 13:10:27 +02:00
db-pool.ts feat: add "application_name" as an optional DB option #1170 (#1478) 2022-04-07 20:55:56 +02:00
environment-store.ts Update environments (#2339) 2022-11-11 10:24:56 +00:00
event-store.test.ts feat: add event search endpoint (#1893) 2022-08-09 16:14:50 +02:00
event-store.ts feat: add count to event list (#2036) 2022-09-02 08:35:31 +02:00
favorite-features-store.ts Favorite features (#2550) 2022-11-29 16:06:08 +01:00
favorite-projects-store.ts Favorite project (#2569) 2022-11-30 13:41:53 +02:00
feature-environment-store.ts feat: Add variants per env (#2471) 2022-11-21 10:37:16 +01:00
feature-strategy-store.ts feature: add query support to features endpoint (#2693) 2022-12-16 12:05:18 +01:00
feature-tag-store.ts fix: tag validation duplicate message (#1756) 2022-06-28 08:04:43 +02:00
feature-toggle-client-store.ts remove feature flag: toggle tag filtering (#2668) 2022-12-12 13:21:12 +00:00
feature-toggle-store.ts feat: Add variants per env (#2471) 2022-11-21 10:37:16 +01:00
feature-type-store.ts refactor: add OpenAPI schema to feature types controller (#1684) 2022-06-09 13:17:13 +02:00
group-store.ts Feat/stats service (#2211) 2022-10-25 13:10:27 +02:00
index.ts Favorite project (#2569) 2022-11-30 13:41:53 +02:00
pat-store.ts fix: limit total of PATs a user can have (#2301) 2022-11-02 08:11:35 +00:00
project-store.ts Favorite project (#2569) 2022-11-30 13:41:53 +02:00
public-signup-token-store.ts Feat/invite user (#2061) 2022-09-30 13:01:32 +02:00
reset-token-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
role-store.ts Feat/stats service (#2211) 2022-10-25 13:10:27 +02:00
segment-store.ts Feat/stats service (#2211) 2022-10-25 13:10:27 +02:00
session-store.ts fix: be explicit when specifying time & replace moment with date-fns (#1072) 2021-11-02 15:13:46 +01:00
setting-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
strategy-store.ts Feat/stats service (#2211) 2022-10-25 13:10:27 +02:00
tag-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
tag-type-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
user-feedback-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
user-splash-store.ts refactor: add schemas to user admin controller (#1692) 2022-06-22 14:55:43 +02:00
user-store.ts feat: update seen_at pat column (#2516) 2022-11-30 08:10:31 +02:00