Browse Source

fix(ui): Fix session resolution on old short-lived releases (#27776)

Matej Minar 3 years ago
parent
commit
50e4c8102f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      static/app/utils/sessions.tsx

+ 5 - 0
static/app/utils/sessions.tsx

@@ -144,6 +144,11 @@ export function getSessionsInterval(
 ) {
   const diffInMinutes = getDiffInMinutes(datetimeObj);
 
+  if (moment(datetimeObj.start).isSameOrBefore(moment().subtract(30, 'days'))) {
+    // we cannot use sub-hour session resolution on buckets older than 30 days
+    highFidelity = false;
+  }
+
   if (diffInMinutes > TWO_WEEKS) {
     return '1d';
   }