Skip to content

Commit

Permalink
fix: include first day of range in the extended metrics (#6245)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Feb 16, 2024
1 parent a8fa1ae commit f0d5c8e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -223,10 +223,13 @@ export default class ClientMetricsServiceV2 {
let hours: HourBucket[];
let metrics: IClientMetricsEnv[];
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 =
await this.clientMetricsStoreV2.getMetricsForFeatureToggleV2(
featureName,
hoursBack,
normalizedHoursBack,
);
hours =
hoursBack > 48
Expand Down

0 comments on commit f0d5c8e

Please sign in to comment.