perf: Remove extra spans (#17464)

This commit is contained in:
Keith Williams
2024-11-04 13:50:49 +00:00
committed by GitHub
parent e74718ac66
commit ff9936fdeb
-7
View File
@@ -253,8 +253,6 @@ export async function getBusyTimes(params: {
})
);
const openSeatsDateRangesSpan = Sentry.startInactiveSpan({ name: "openSeatsDateRanges" });
const openSeatsDateRanges = Object.keys(bookingSeatCountMap).map((key) => {
const [start, end] = key.split("<>");
return {
@@ -263,8 +261,6 @@ export async function getBusyTimes(params: {
};
});
openSeatsDateRangesSpan.end();
if (rescheduleUid) {
const originalRescheduleBooking = bookings.find((booking) => booking.uid === rescheduleUid);
// calendar busy time from original rescheduled booking should not be blocked
@@ -276,7 +272,6 @@ export async function getBusyTimes(params: {
}
}
const finalizeBusyTimesSpan = Sentry.startInactiveSpan({ name: "finalizeBusyTimes" });
const result = subtract(
calendarBusyTimes.map((value) => ({
...value,
@@ -294,8 +289,6 @@ export async function getBusyTimes(params: {
}))
);
finalizeBusyTimesSpan.end();
/*
// TODO: Disabled until we can filter Zoom events by date. Also this is adding too much latency.
const videoBusyTimes = (await getBusyVideoTimes(credentials)).filter(notEmpty);