Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

birdseye measures support

Blue Mouse8cb4cdda43b2
diff --git a/app/api/index.ts b/app/api/index.ts
index e6ba8d6bd..cf11b2c88 100644
--- a/app/api/index.ts
+++ b/app/api/index.ts
@@ -608,13 +608,14 @@ export const getPerformanceOverallStats = (
to = '',
timezone = 'Etc/GMT',
filters: any = '',
+ measure: any = '',
password?: string,
) =>
api
.get(
`log/performance/birdseye?pids=[${_map(pids, (pid) => `"${pid}"`).join(
',',
- )}]&period=${period}&from=${from}&to=${to}&timezone=${timezone}&filters=${JSON.stringify(filters)}`,
+ )}]&period=${period}&from=${from}&to=${to}&timezone=${timezone}&filters=${JSON.stringify(filters)}&measure=${measure}`,
{
headers: {
'x-password': password,
diff --git a/app/pages/Project/View/ViewProject.tsx b/app/pages/Project/View/ViewProject.tsx
index 87cf46e7c..b2c653591 100644
--- a/app/pages/Project/View/ViewProject.tsx
+++ b/app/pages/Project/View/ViewProject.tsx
@@ -1424,6 +1424,11 @@ const ViewProject = ({
let toCompare: string | undefined
let rawOverall: any
+ const measure =
+ activeChartMetricsPerf === CHART_METRICS_MAPPING_PERF.quantiles
+ ? CHART_METRICS_MAPPING_PERF.quantiles
+ : activePerfMeasure
+
if (isActiveCompare) {
if (dateRangeCompare && activePeriodCompare === PERIOD_PAIRS_COMPARE.CUSTOM) {
let start
@@ -1448,7 +1453,7 @@ const ViewProject = ({
toCompare,
timeBucket,
newFilters || filtersPerf,
- activePerfMeasure,
+ measure,
)
} else {
showError(t('project.compareDateRangeError'))
@@ -1470,7 +1475,7 @@ const ViewProject = ({
toCompare,
timeBucket,
newFilters || filtersPerf,
- activePerfMeasure,
+ measure,
)
}
}
@@ -1487,7 +1492,7 @@ const ViewProject = ({
fromCompare,
toCompare,
timezone,
- activePerfMeasure,
+ measure,
projectPassword,
)
const compareOverall = await getPerformanceOverallStats(
@@ -1497,6 +1502,7 @@ const ViewProject = ({
toCompare,
timezone,
newFilters || filters,
+ measure,
projectPassword,
)
dataCompare.overall = compareOverall[id]
@@ -1506,11 +1512,6 @@ const ViewProject = ({
setProjectCachePerf(id, dataCompare || {}, keyCompare)
}
- const measure =
- activeChartMetricsPerf === CHART_METRICS_MAPPING_PERF.quantiles
- ? CHART_METRICS_MAPPING_PERF.quantiles
- : activePerfMeasure
-
if (dateRange) {
from = getFormatDate(dateRange[0])
to = getFormatDate(dateRange[1])
@@ -1556,6 +1557,7 @@ const ViewProject = ({
'',
timezone,
newFilters || filters,
+ measure,
projectPassword,
)
}