Skip to content

Commit

Permalink
chore: Trace RRule (#9756)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch authored May 15, 2024
1 parent 1c8fa84 commit 341772a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ const processRecurrence: MutationResolvers['processRecurrence'] = async (_source

// For meetings that should still be active, start the meeting and set its end time.
// Any subscriptions are handled by the shared meeting start code
const rrule = RRule.fromString(meetingSeries.recurrenceRule)
const rrule = tracer.trace('RRule.fromString', () =>
RRule.fromString(meetingSeries.recurrenceRule)
)
// technically, RRULE should never return NaN here but there's a bug in the library
// https://github.com/jakubroztocil/rrule/issues/321
if (isNaN(rrule.options.interval)) {
Expand All @@ -202,9 +204,8 @@ const processRecurrence: MutationResolvers['processRecurrence'] = async (_source
Math.max(lastMeeting.createdAt.getTime() + ms('10m'), now.getTime() - ms('24h'))
)
: new Date(0)
const newMeetingsStartTimes = rrule.between(
getRRuleDateFromJSDate(fromDate),
getRRuleDateFromJSDate(now)
const newMeetingsStartTimes = tracer.trace('RRule.between', () =>
rrule.between(getRRuleDateFromJSDate(fromDate), getRRuleDateFromJSDate(now))
)
for (const startTime of newMeetingsStartTimes) {
const err = await tracer.trace('startRecurringMeeting', async (span) => {
Expand Down

0 comments on commit 341772a

Please sign in to comment.