mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
fix: include first day of range in the extended metrics (#6245)
This commit is contained in:
parent
a8fa1ae347
commit
f0d5c8e3d1
@ -223,10 +223,13 @@ export default class ClientMetricsServiceV2 {
|
|||||||
let hours: HourBucket[];
|
let hours: HourBucket[];
|
||||||
let metrics: IClientMetricsEnv[];
|
let metrics: IClientMetricsEnv[];
|
||||||
if (this.flagResolver.isEnabled('extendedUsageMetrics')) {
|
if (this.flagResolver.isEnabled('extendedUsageMetrics')) {
|
||||||
|
// if we're in the daily range we need to add one more day
|
||||||
|
const normalizedHoursBack =
|
||||||
|
hoursBack > 48 ? hoursBack + 24 : hoursBack;
|
||||||
metrics =
|
metrics =
|
||||||
await this.clientMetricsStoreV2.getMetricsForFeatureToggleV2(
|
await this.clientMetricsStoreV2.getMetricsForFeatureToggleV2(
|
||||||
featureName,
|
featureName,
|
||||||
hoursBack,
|
normalizedHoursBack,
|
||||||
);
|
);
|
||||||
hours =
|
hours =
|
||||||
hoursBack > 48
|
hoursBack > 48
|
||||||
|
Loading…
Reference in New Issue
Block a user