mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: Store metrics only if not empty (#991)
This commit is contained in:
parent
35f2f92257
commit
f6169540a5
@ -140,8 +140,12 @@ export default class ClientMetricsService {
|
||||
): Promise<void> {
|
||||
const value = await clientMetricsSchema.validateAsync(data);
|
||||
const toggleNames = Object.keys(value.bucket.toggles);
|
||||
await this.featureToggleStore.setLastSeen(toggleNames);
|
||||
await this.clientMetricsStore.insert(value);
|
||||
|
||||
if (toggleNames.length > 0) {
|
||||
await this.featureToggleStore.setLastSeen(toggleNames);
|
||||
await this.clientMetricsStore.insert(value);
|
||||
}
|
||||
|
||||
await this.clientInstanceStore.insert({
|
||||
appName: value.appName,
|
||||
instanceId: value.instanceId,
|
||||
|
Loading…
Reference in New Issue
Block a user