1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00
unleash.unleash/src/lib/services
Christopher Kolstad 1edd73db45
feat: feature changes counted in new table (#4958)
As part of more telemetry on the usage of Unleash. 

This PR adds a new `stat_` prefixed table as well as a trigger on the
events table trigger on each insert to increment a counter per
environment per day.

The trigger will trigger on every insert into the events base, but will
filter and only increment the counter for events that actually have the
environment set. (there are events, like user-created, that does not
relate to a specific environment).

Bit wary on this, but since we truncate down to row per (day,
environment) combo, finding conflict and incrementing shouldn't take too
long here.

@ivarconr was it something like this you were considering?
2023-10-10 12:32:23 +02:00
..
client-metrics Fix/last seen at by environment (#4939) 2023-10-09 10:54:00 +02:00
access-service.test.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
access-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
account-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
addon-schema.ts
addon-service-test-simple-addon.ts
addon-service.test.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
addon-service.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
api-token-service.test.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
api-token-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
client-spec-service.test.ts
client-spec-service.ts
context-schema.ts
context-service.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
edge-service.ts
email-service.test.ts
email-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
environment-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
event-announcer-service.ts
event-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
favorites-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
feature-service-potentially-stale.test.ts feat: copy feature with parent (#4918) 2023-10-04 12:20:27 +02:00
feature-tag-service.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
feature-toggle-service.ts feat: render segments changes in feature strategy update event messages (#4950) 2023-10-09 09:11:39 +02:00
feature-type-service.ts
group-service.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
health-service.ts
index.ts feat: feature changes counted in new table (#4958) 2023-10-10 12:32:23 +02:00
maintenance-service.test.ts
maintenance-service.ts
openapi-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
pat-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
project-health-service.ts fix: update potentially-stale status dynamically (#4905) 2023-10-04 12:47:16 +03:00
project-schema.ts
project-service.ts fix: refactor getProjectOverview store method (#4972) 2023-10-10 07:34:21 +02:00
proxy-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
public-signup-token-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
reset-token-service.ts
scheduler-service.test.ts
scheduler-service.ts
segment-schema.ts
segment-service.ts feat: add more events in integrations (#4815) 2023-09-29 16:11:59 +01:00
session-service.ts
setting-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
state-schema.ts
state-service-export-v1.json
state-service.test.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
state-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
state-util.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
strategy-schema.ts
strategy-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
tag-schema.test.ts
tag-schema.ts
tag-service.ts refactor: prefer eventService.storeEvent methods (#4830) 2023-09-27 14:23:05 +01:00
tag-type-schema.test.ts
tag-type-schema.ts
tag-type-service.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
user-feedback-service.ts
user-service.test.ts feat: allow defining initial admin user as env variable (#4927) 2023-10-06 09:07:06 +02:00
user-service.ts feat: allow defining initial admin user as env variable (#4927) 2023-10-06 09:07:06 +02:00
user-splash-service.ts
version-service.test.ts feat: feature changes counted in new table (#4958) 2023-10-10 12:32:23 +02:00
version-service.ts feat: feature changes counted in new table (#4958) 2023-10-10 12:32:23 +02:00