* refactor: apply biome formatting to small packages + packages/lib
Format packages/sms, packages/prisma, packages/platform/libraries,
packages/platform/examples, packages/platform/types, packages/emails,
and packages/lib.
Excludes packages/platform/examples/base/src/pages/[bookingUid].tsx
due to pre-existing lint errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* revert: remove packages/platform formatting changes
Revert biome formatting for packages/platform as requested.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 07:39:01 -03:00
Volnei MunhozGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(calendar-subscription): add telemetry metrics for cache performance and webhook calls
- Add Sentry span telemetry to CalendarCacheWrapper.getAvailability() and getAvailabilityWithTimeZones() to measure:
- Cache fetch duration (cacheFetchDurationMs)
- Original calendar fetch duration (originalFetchDurationMs)
- Number of calendars from cache vs original source
- Number of events from each source
- Whether cache was used (cacheUsed)
- Add Sentry span telemetry to CalendarSubscriptionService.processWebhook() to track:
- Provider (google_calendar, office365_calendar)
- Success/failure status
- Processing duration (durationMs)
- Error messages on failure
- Channel ID and selected calendar ID
- Create telemetry module with types, sentry-span, and no-op-span implementations
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
* refactor(calendar-subscription): move telemetry to @calcom/lib for reusability
- Add withSpan helper to @calcom/lib/sentryWrapper for reusable telemetry
- Update CalendarCacheWrapper to use withSpan from @calcom/lib
- Update CalendarTelemetryWrapper to use withSpan from @calcom/lib
- Update CalendarSubscriptionService to use withSpan from @calcom/lib
- Remove old telemetry module from calendar-subscription feature
- Add telemetry tracking when cache is disabled for performance comparison
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
* fix(calendar-subscription): only apply telemetry wrapper when Sentry is configured
- Fix unit test failures by checking if Sentry is configured before wrapping
- Remove ESLint inline rules from getCalendar.ts
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
* refactor(calendar-subscription): move CalendarTelemetryWrapper to telemetry directory
- Move CalendarTelemetryWrapper from cache/ to telemetry/ directory
- Update import path in getCalendar.ts
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
* feat(telemetry): add console fallback when Sentry is not configured
- Add console logging fallback in development mode when Sentry is not configured
- Create isTelemetryEnabled() helper to check if telemetry should be enabled
- Update getCalendar.ts to use isTelemetryEnabled() helper
- Logs span name, operation, duration, and attributes to console via @calcom/lib/logger
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
* refactor(calendar-subscription): wrap all calendars with CalendarTelemetryWrapper
- CalendarTelemetryWrapper now wraps ALL cache-supported calendars with cacheEnabled parameter
- CalendarCacheWrapper keeps cache-specific metrics with distinct op (calendar.cache.internal.*)
- CalendarTelemetryWrapper uses canonical op (calendar.getAvailability) for consistent querying
- Nested spans: outer telemetry wrapper measures end-to-end, inner cache wrapper measures cache internals
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>