chore: Move sentry to faro for client side#40220
Conversation
WalkthroughThis pull request systematically removes Sentry-based error tracking and profiling, replacing it with a custom error capturing function from Changes
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (1)
179-179: Sentry profiler wrapper removed.The component is now exported directly without Sentry profiling. Consider implementing equivalent performance monitoring with Faro if needed.
app/client/src/utils/Analytics/sentry.ts (1)
24-24: Convert static-only class to simple functions.
Since the class contains only static members, consider refactoring into standalone functions for lighter maintenance.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (65)
app/client/src/AppErrorBoundry.tsx(2 hunks)app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx(2 hunks)app/client/src/actions/pageActions.tsx(2 hunks)app/client/src/api/helpers/validateJsonResponseMeta.ts(2 hunks)app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts(1 hunks)app/client/src/api/interceptors/response/failureHandlers/handleNotFoundError.ts(2 hunks)app/client/src/api/interceptors/response/failureHandlers/handleUnauthorizedError.ts(2 hunks)app/client/src/ce/sagas/PageSagas.tsx(2 hunks)app/client/src/ce/utils/AnalyticsUtil.tsx(3 hunks)app/client/src/components/SentryRoute.tsx(1 hunks)app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx(2 hunks)app/client/src/components/editorComponents/CodeEditor/index.tsx(1 hunks)app/client/src/components/editorComponents/EntityExplorerSidebar.tsx(1 hunks)app/client/src/components/editorComponents/ErrorBoundry.tsx(2 hunks)app/client/src/components/editorComponents/PropertyPaneSidebar.tsx(1 hunks)app/client/src/components/propertyControls/PrimaryColumnsControl.tsx(1 hunks)app/client/src/components/propertyControls/PrimaryColumnsControlV2.tsx(2 hunks)app/client/src/components/propertyControls/PrimaryColumnsControlWDS.tsx(1 hunks)app/client/src/components/propertyControls/TabControl.tsx(2 hunks)app/client/src/ee/sagas/index.tsx(2 hunks)app/client/src/git/sagas/helpers/handleApiErrors.ts(2 hunks)app/client/src/instrumentation/index.ts(4 hunks)app/client/src/instrumentation/sendFaroErrors.ts(1 hunks)app/client/src/pages/AppIDE/AppIDE.tsx(1 hunks)app/client/src/pages/AppViewer/index.tsx(1 hunks)app/client/src/pages/Editor/Canvas.tsx(2 hunks)app/client/src/pages/Editor/CanvasLayoutConversion/ConversionButton.tsx(1 hunks)app/client/src/pages/Editor/CanvasLayoutConversion/SnapShotBannerCTA.tsx(1 hunks)app/client/src/pages/Editor/CanvasPropertyPane/index.tsx(1 hunks)app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx(1 hunks)app/client/src/pages/Editor/JSEditor/index.tsx(2 hunks)app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx(1 hunks)app/client/src/pages/Editor/ThemePropertyPane/SettingSection.tsx(1 hunks)app/client/src/pages/Editor/ThemePropertyPane/ThemeCard.tsx(1 hunks)app/client/src/pages/Editor/ThemePropertyPane/index.tsx(1 hunks)app/client/src/pages/UserAuth/Login.tsx(2 hunks)app/client/src/pages/UserAuth/SignUp.tsx(2 hunks)app/client/src/pages/UserAuth/VerifyUser.tsx(2 hunks)app/client/src/pages/UserAuth/helpers.ts(2 hunks)app/client/src/reducers/evaluationReducers/treeReducer.ts(2 hunks)app/client/src/sagas/ActionExecution/PluginActionSaga.ts(2 hunks)app/client/src/sagas/AppThemingSaga.tsx(2 hunks)app/client/src/sagas/ErrorSagas.tsx(2 hunks)app/client/src/sagas/EvalErrorHandler.ts(4 hunks)app/client/src/sagas/EvaluationsSaga.ts(3 hunks)app/client/src/sagas/FormEvaluationSaga.ts(2 hunks)app/client/src/sagas/InitSagas.ts(4 hunks)app/client/src/sagas/ReplaySaga.ts(4 hunks)app/client/src/sagas/WidgetLoadingSaga.ts(2 hunks)app/client/src/sagas/layoutConversionSagas.ts(2 hunks)app/client/src/utils/Analytics/sentry.ts(1 hunks)app/client/src/utils/getPathAndValueFromActionDiffObject.ts(2 hunks)app/client/src/utils/helpers.test.ts(1 hunks)app/client/src/utils/helpers.tsx(2 hunks)app/client/src/widgets/CurrencyInputWidget/widget/index.tsx(4 hunks)app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx(2 hunks)app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.ts(2 hunks)app/client/src/widgets/MapChartWidget/component/utilities.ts(2 hunks)app/client/src/widgets/PhoneInputWidget/widget/index.tsx(2 hunks)app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx(2 hunks)app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx(2 hunks)app/client/src/widgets/TabsMigrator/widget/index.tsx(2 hunks)app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx(4 hunks)app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx(2 hunks)app/client/src/workers/Evaluation/errorModifier.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (34)
app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts (2)
app/client/src/api/types.ts (1)
ApiResponse(14-18)app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/api/interceptors/response/failureHandlers/handleNotFoundError.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/ReplaySaga.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/components/editorComponents/ErrorBoundry.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/api/helpers/validateJsonResponseMeta.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/EvaluationsSaga.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/AppErrorBoundry.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/FormEvaluationSaga.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/pages/Editor/Canvas.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/ActionExecution/PluginActionSaga.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/ErrorSagas.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/components/propertyControls/TabControl.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/MapChartWidget/component/utilities.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/ee/sagas/index.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/workers/Evaluation/errorModifier.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/utils/helpers.test.ts (1)
app/client/src/utils/helpers.tsx (1)
captureInvalidDynamicBindingPath(934-963)
app/client/src/utils/getPathAndValueFromActionDiffObject.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/utils/helpers.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/TabsMigrator/widget/index.tsx (2)
app/client/src/WidgetProvider/constants.ts (1)
DSLWidget(220-222)app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/reducers/evaluationReducers/treeReducer.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/PhoneInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/widgets/CurrencyInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/api/interceptors/response/failureHandlers/handleUnauthorizedError.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/layoutConversionSagas.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/InitSagas.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/git/sagas/helpers/handleApiErrors.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
app/client/src/sagas/WidgetLoadingSaga.ts (1)
app/client/src/instrumentation/sendFaroErrors.ts (1)
captureException(4-19)
🪛 Biome (1.9.4)
app/client/src/utils/Analytics/sentry.ts
[error] 3-22: Avoid classes that contain only static members.
Prefer using simple functions instead of classes with only static members.
(lint/complexity/noStaticOnlyClass)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-build / client-build
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
🔇 Additional comments (127)
app/client/src/components/SentryRoute.tsx (1)
3-3: Removed Sentry routing integrationThis change removes the Sentry route tracking wrapper while preserving the component name for backward compatibility. Any components using SentryRoute will continue to work but will no longer have Sentry's route tracking.
app/client/src/sagas/ReplaySaga.ts (4)
11-11: Import Faro error tracking utilityAdded import for the custom error tracking function from
instrumentation/sendFaroErrorsto replace Sentry's error capturing functionality.
135-135: Updated error capturing with contextChanged from Sentry's error capturing to Faro's implementation with additional context via the errorName parameter.
167-167: Updated error capturing with contextReplaced Sentry's error capturing with Faro's implementation, adding "PostUndoRedoError" as the error name for better categorization.
260-260: Updated error capturing with contextSwitched from Sentry to Faro for error tracking, maintaining the error handling pattern while adding "UndoRedoSagaError" for improved error classification.
app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx (2)
23-23: Import Faro error tracking utilityAdded import for the custom error tracking function to replace Sentry's functionality in the currency formatting error handler.
230-230: Updated error capturing with contextChanged from Sentry's error capturing to Faro's implementation with "TableWidgetV2_PlainTextCell" as the error name, providing better context for debugging currency formatting issues.
app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx (1)
59-59: Removed Sentry profiling wrapperThe Sentry profiler has been removed from the component export. The component will continue to function as before, but performance tracking through Sentry is no longer available for this component.
app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts (2)
3-3: Import updated to use Faro instead of SentryThe import statement has been updated to use the new
captureExceptionfunction frominstrumentation/sendFaroErrorsinstead of Sentry.
9-10: Enhanced error context with errorNameGood addition of the
errorNameparameter to provide more specific context for error tracking. This will make it easier to filter and identify this specific error type in monitoring tools.app/client/src/pages/Editor/Canvas.tsx (2)
22-22: Import updated to use Faro instead of SentryThe import statement has been updated to use the new
captureExceptionfunction frominstrumentation/sendFaroErrorsinstead of Sentry.
123-123: Enhanced error context with component nameGood enhancement by adding the
errorName: "Canvas"parameter when capturing exceptions. This provides better context for error tracking by clearly identifying which component generated the error.app/client/src/pages/Editor/CanvasLayoutConversion/ConversionButton.tsx (1)
110-110:Details
❓ Verification inconclusive
Removed Sentry profiling wrapper
The
Sentry.withProfilerwrapper has been removed as part of the migration from Sentry to Faro. Make sure that you have an alternative way to profile this component if performance monitoring was important.It would be helpful to check if there's a similar profiling capability in Faro that should be applied here:
🌐 Web query:
Does Grafana Faro have a profiling capability similar to Sentry's withProfiler?💡 Result:
Grafana Faro provides React component profiling capabilities through its
@grafana/faro-reactpackage, offering functionality similar to Sentry'swithProfiler. Here's a detailed comparison:Grafana Faro Profiling Implementation
Instrumentation Setup:
- Requires initializing Faro with the
web-tracingpackage andTracingInstrumentation[4]:import { getWebInstrumentations, initializeFaro } from '@grafana/faro-react'; import { TracingInstrumentation } from '@grafana/faro-web-tracing'; initializeFaro({ instrumentations: [ ...getWebInstrumentations(), new TracingInstrumentation() ] });- Components are wrapped with
withFaroProfiler[4]:import { withFaroProfiler } from '@grafana/faro-react'; export default withFaroProfiler(MyComponent);Key Features:
- Tracks component mount/render duration and updates
- Generates spans for performance analysis
- Integrates with Grafana's full-stack observability tools (Loki, Tempo, Mimir)[5]
Caveats:
- Explicitly warns against production use due to performance impact[4]
- Requires manual configuration of tracing instrumentation
- Currently lacks automatic route-based transaction tracking[7]
Sentry withProfiler Comparison
Feature Grafana Faro Sentry Automatic transaction tracking Manual setup required Automatic route-based tracking[6] Production readiness Not recommended[4] Supported in production Integration complexity Requires tracing package setup[4] Built-in React integration[2] Data visualization Grafana dashboards & flame graphs[1] Sentry Performance UI[6] Open-source core Full OSS (AGPLv3)[5] Limited OSS features[7] While both tools enable component-level performance monitoring, Grafana Faro excels in tight integration with the Grafana observability stack, while Sentry offers more polished React-specific tooling and production-ready profiling[3][7]. Faro's profiling capability requires explicit opt-in through instrumentation configuration but provides deeper correlation with backend metrics and logs in Grafana-powered environments[5].
Citations:
- 1: https://www.infoq.com/news/2022/12/grafana-faro-phlare/
- 2: https://www.npmjs.com/package/@sentry/react
- 3: https://www.genspark.ai/spark/understanding-grafana-faro-for-web-frontend-monitoring/dea2e7bb-1d46-4737-876b-4d62fbdbe5c7
- 4: https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/instrument/faro-react/component-profiler/
- 5: https://grafana.com/oss/faro/
- 6: https://docs.sentry.io/platforms/javascript/guides/react/features/component-monitoring/
- 7: https://blog.mayflower.de/15107-grafana-faro-frontend-observability.html
- 8: https://grafana.com/docs/grafana/latest/explore/simplified-exploration/profiles/concepts/continuous-profiling/
- 9: https://grafana.com/docs/grafana-cloud/monitor-applications/profiles/introduction/profiling-types/
- 10: getsentry/sentry-docs#7240
Profiling Integration Update Required
The Sentry profiling wrapper was removed as part of the Faro migration. Note that Grafana Faro provides similar profiling support via its
withFaroProfilerHOC (from the@grafana/faro-reactpackage). If maintaining component profiling is important, consider updating the export to wrapConversionButtonwithwithFaroProfiler. For example:import { withFaroProfiler } from '@grafana/faro-react'; export default withFaroProfiler(ConversionButton);
- Location:
app/client/src/pages/Editor/CanvasLayoutConversion/ConversionButton.tsx(Line 110)- Action: Evaluate whether performance monitoring remains necessary and, if so, integrate Faro's profiling as shown above.
app/client/src/pages/Editor/ThemePropertyPane/SettingSection.tsx (1)
58-58:Details
❓ Verification inconclusive
Removed Sentry profiling wrapper
The
Sentry.withProfilerwrapper has been removed as part of the migration from Sentry to Faro. Ensure that any necessary performance monitoring for this component is handled through alternative means.It would be helpful to check if there's a component-level profiling alternative in Faro:
🏁 Script executed:
#!/bin/bash # Check if there are any Faro profiling utilities imported in the codebase rg -l "import.*from.*faro.*profil" --type ts --type tsxLength of output: 85
Below is a revised review comment. It now clearly notes that we haven't found evidence of a Faro profiling alternative and asks you to manually verify whether a component-level profiling mechanism is needed:
Action Needed: Verify Faro Profiling Approach
The Sentry.withProfiler wrapper was removed as part of the migration to Faro. However, a search for Faro’s component-level profiling imports (using the updated command below) did not yield any evidence of an alternative mechanism:
#!/bin/bash # Check if there are any Faro profiling utilities imported in the codebase rg -l "import.*from.*faro.*profil" --type-add "tsx:*.tsx" --type ts --type tsxPlease run the above script (or verify manually) to confirm whether a Faro-specific profiling solution exists. If no alternative profiling is in place, ensure that performance monitoring is handled appropriately—either by adding a Faro equivalent or by relying on a global strategy.
File: app/client/src/pages/Editor/ThemePropertyPane/SettingSection.tsx (line 58)
app/client/src/components/editorComponents/EntityExplorerSidebar.tsx (1)
175-175: LGTM - Removed Sentry profiling wrapperThe change replaces the Sentry profiler wrapper with a direct component export as part of moving from Sentry to Faro for error tracking and profiling.
app/client/src/sagas/FormEvaluationSaga.ts (2)
14-14: LGTM - Import Faro error capturing functionThe import statement correctly brings in the custom error capturing function from the Faro instrumentation module.
375-375: LGTM - Replaced Sentry with Faro error capturingThe implementation now uses the Faro error capturing mechanism with an appropriate error name for better context and categorization.
app/client/src/api/helpers/validateJsonResponseMeta.ts (2)
1-1: LGTM - Import Faro error capturing functionCorrectly imports the custom error capturing function from the Faro instrumentation module.
10-12: LGTM - Enhanced error context with named errorsGood implementation that maintains the existing context object while adding an error name for better categorization and tracking.
app/client/src/pages/AppViewer/index.tsx (1)
261-261: LGTM - Removed Sentry profiling wrapperThe change correctly preserves the withRouter HOC while removing the Sentry profiler wrapper, aligning with the migration from Sentry to Faro.
app/client/src/pages/Editor/CanvasPropertyPane/index.tsx (1)
48-48: Sentry profiler wrapper removedClean removal of the Sentry profiler wrapper around the CanvasPropertyPane component. This change is aligned with the PR's objective to move from Sentry to Faro.
app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx (2)
17-17: Added import for captureException functionAdded import for the custom error capturing function that replaces Sentry.
135-135: Replaced Sentry with Faro error trackingThe Sentry.captureException call has been replaced with the custom captureException function. The added errorName parameter provides better context for error tracking.
app/client/src/pages/Editor/JSEditor/index.tsx (1)
70-70: Sentry profiler wrapper removedClean removal of the Sentry profiler wrapper around the JSEditor component as part of the migration from Sentry to Faro.
app/client/src/pages/Editor/ThemePropertyPane/ThemeCard.tsx (1)
248-248: Sentry profiler wrapper removedClean removal of the Sentry profiler wrapper around the ThemeCard component as part of the migration from Sentry to Faro.
app/client/src/components/editorComponents/PropertyPaneSidebar.tsx (1)
106-106: Sentry profiler removed from PropertyPaneSidebar componentThe code has been refactored to remove Sentry profiling from the PropertyPaneSidebar component. This change aligns with the PR objective of moving from Sentry to Faro for error and performance tracking.
app/client/src/components/editorComponents/ErrorBoundry.tsx (2)
4-4: Sentry import replaced with Faro error trackingImport statement has been updated to use captureException from the sendFaroErrors utility instead of Sentry.
42-42: Error capturing switched to Faro with improved contextThe error capturing has been refactored to use the new Faro-based captureException function with additional context through the errorName parameter. This provides better error identification and tracking.
app/client/src/pages/AppIDE/AppIDE.tsx (1)
224-224: Sentry profiler removed from Editor componentRemoved the Sentry.withProfiler wrapper from the Editor component export, aligning with the migration from Sentry to Faro for application monitoring and profiling.
app/client/src/AppErrorBoundry.tsx (2)
7-7: Sentry import replaced with Faro error trackingImport statement has been updated to use captureException from the sendFaroErrors utility instead of Sentry.
35-35: Error capturing switched to Faro with improved contextThe error capturing implementation has been refactored to use the new Faro-based captureException function with additional context via the errorName parameter. This provides better error identification in the AppErrorBoundary component.
app/client/src/instrumentation/sendFaroErrors.ts (1)
1-21: Well-structured error capturing utility functionThis is a well-implemented wrapper for Faro's error tracking functionality. The function properly generates a unique ID for each error, handles different error types by ensuring they're converted to Error objects when needed, and includes a robust try/catch block to prevent failures in the error tracking itself.
app/client/src/ce/sagas/PageSagas.tsx (2)
154-154: Good addition of captureException importThis import correctly replaces the removed Sentry import, aligning with the migration to Faro for error tracking.
573-575: Improved error context with errorName parameterThe implementation properly replaces Sentry with the new captureException function, and enhances error tracking by adding a specific errorName for better error identification and categorization.
app/client/src/pages/UserAuth/SignUp.tsx (2)
67-67: Good addition of captureException importThis import correctly replaces the removed Sentry import for error tracking functionality.
148-150: Improved error wrapping and contextThe change properly wraps the error message in an Error object and provides additional context through the errorName property, which will help with error categorization and filtering.
app/client/src/components/propertyControls/TabControl.tsx (2)
13-13: Good addition of captureException importThis import correctly replaces the removed Sentry import for error tracking functionality.
134-141: Enhanced error context with structured dataThe implementation properly migrates from Sentry to the new captureException function while maintaining the same error details. The addition of the errorName parameter provides better context for error tracking and filtering.
app/client/src/sagas/EvaluationsSaga.ts (3)
125-125: New import for error capturing.Replacing Sentry with custom error capture implementation from
instrumentation/sendFaroErrors.
935-935: Enhanced error capture with context.Adding
errorNameparameter provides better context for debugging evaluation errors.
1006-1006: Enhanced error capture with context.Adding
errorNameparameter provides better context for debugging evaluation errors.app/client/src/api/interceptors/response/failureHandlers/handleUnauthorizedError.ts (2)
7-7: New import for error capturing.Replacing Sentry with custom error capture implementation.
23-23: Enhanced error capture with context.Adding
errorNameparameter provides better context for unauthorized error tracking.app/client/src/components/editorComponents/CodeEditor/index.tsx (1)
1921-1921: Removed Sentry profiler wrapper.Component no longer wrapped with Sentry profiler, which may affect performance monitoring. Ensure that performance tracking is handled appropriately through Faro if needed.
Are there alternative performance monitoring mechanisms implemented with Faro to replace Sentry's profiling capabilities?
app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx (2)
12-12: New import for error capturing.Replacing Sentry with custom error capture implementation.
106-106: Enhanced error capture with context.Adding
errorNameparameter provides better context for form rendering errors.app/client/src/ee/sagas/index.tsx (2)
6-6: Correctly imports the new error tracking utility.The import change from Sentry to the custom error tracking function aligns with the migration strategy.
25-25: Good enhancement with error categorization.The error logging now includes contextual metadata via the
errorNameparameter, which will improve error tracking and categorization capabilities.app/client/src/git/sagas/helpers/handleApiErrors.ts (2)
1-1: Correctly imports from the new error tracking module.The import statement has been successfully updated to use the custom error capture function.
25-25: Enhanced error context for Git API errors.The error reporting now includes the specific error category "GitApiError", which improves error classification and debugging capabilities.
app/client/src/sagas/layoutConversionSagas.ts (2)
29-29: Updated import for error tracking.The import has been correctly switched from Sentry to the custom error tracking function.
217-217: Enhanced layout conversion error reporting.Good use of the
yield call()pattern for the saga and appropriate error categorization with "LayoutConversionError".app/client/src/pages/UserAuth/Login.tsx (2)
55-55: Updated import for error tracking.The import has been correctly changed to use the custom error tracking function.
119-119: Improved login error handling.The error reporting now properly creates an Error object and adds context through the "LoginError" category, enhancing error classification.
app/client/src/pages/Editor/CanvasLayoutConversion/SnapShotBannerCTA.tsx (1)
132-132: LGTM - Removed Sentry profiler wrappingThe component is now directly exported without Sentry's profiler wrapper, aligning with the migration from Sentry to Faro.
app/client/src/pages/Editor/ThemePropertyPane/index.tsx (1)
49-49: LGTM - Removed Sentry profiler wrappingThe component is now directly exported without Sentry's profiler wrapper, aligning with the migration from Sentry to Faro.
app/client/src/utils/getPathAndValueFromActionDiffObject.ts (2)
1-1: LGTM - Updated import for error trackingImport changed from Sentry to custom Faro error handling function.
50-56: LGTM - Enhanced error capture with contextReplaced Sentry with Faro error capture and added explicit errorName for better error context.
app/client/src/actions/pageActions.tsx (2)
32-32: LGTM - Updated import for error trackingImport changed from Sentry to custom Faro error handling function.
326-328: LGTM - Improved error handling with better contextThe change correctly creates a proper Error object and adds an errorName parameter for better error tracking in Faro.
app/client/src/api/interceptors/response/failureHandlers/handleNotFoundError.ts (2)
9-9: Appropriate import for the new error handling mechanism.The import statement correctly brings in the new
captureExceptionfunction from the Faro error tracking system, replacing the previous Sentry import.
23-23: Error tracking updated with improved context.The implementation now includes an error name parameter, which will help with error categorization and filtering in the Faro system.
app/client/src/utils/helpers.test.ts (2)
539-539: Test spy correctly updated for new error handling mechanism.The test now spies on
console.errorinstead of Sentry's captureException function, aligning with the implementation changes in the codebase.
542-546: Test expectations updated to match new implementation.The test now correctly verifies that console.error is called with the expected error message, maintaining the test's intent while adapting to the implementation change.
app/client/src/widgets/TabsMigrator/widget/index.tsx (3)
15-15: Appropriate import for the new error tracking system.The import correctly brings in the captureException function from the Faro system.
23-27: Error tracking updated with improved context.The implementation now includes an error name parameter while maintaining the original error context (message and oldData).
120-124: Error handling consistently implemented.The same pattern of including error name context is applied to all error capture instances in the file.
app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx (2)
23-23: Good migration from Sentry to FaroThe import of
captureExceptionfrom the custom error tracking module is correctly added.
165-167: Error handling properly updated with contextThe error capture now includes a descriptive
errorNameparameter, which will make error tracking more informative.app/client/src/widgets/CurrencyInputWidget/widget/index.tsx (4)
46-46: Correctly imported captureExceptionThe import statement for the custom error tracking function is properly added.
501-503: Error context added for formatText methodThe error handling now includes widget context information, improving error diagnostics.
519-521: Error context added for onValueChange methodConsistent error handling pattern applied with appropriate widget identification.
577-579: Error context added for handleFocusChange methodThe error capture now includes the widget name, maintaining consistency with other error handlers.
app/client/src/components/propertyControls/PrimaryColumnsControlWDS.tsx (1)
499-501: Sentry profiler successfully removedThe component is now wrapped directly with
connectwithout the Sentry profiler, aligning with the migration from Sentry to Faro.app/client/src/sagas/ErrorSagas.tsx (2)
44-44: Correctly imported captureExceptionThe import statement for the custom error tracking function is properly added.
301-301: Error saga properly updatedThe saga now uses the new error capturing mechanism with descriptive error context, enhancing error reporting capabilities.
app/client/src/widgets/PhoneInputWidget/widget/index.tsx (2)
41-41: Import changed from Sentry to custom error trackingThe import for error tracking has been changed from Sentry to a custom error capturing function.
351-351: Error tracking updated to include contextError tracking was updated to include component name as context, which will improve error identification and debugging.
-Sentry.captureException(e); +captureException(e, { errorName: "PhoneInputWidget" });app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.ts (2)
10-10: Import changed from Sentry to custom error trackingThe import for error tracking has been changed from Sentry to a custom error capturing function.
56-58: Error tracking updated with detailed contextError tracking was updated to include a specific component identifier as context, which improves error tracing and debugging.
-Sentry.captureException(e); +captureException(e, { + errorName: "JSONFormWidget_useRegisterFieldValidity", +});app/client/src/utils/helpers.tsx (2)
47-47: Import changed from Sentry to custom error trackingThe import for error tracking has been changed from Sentry to a custom error capturing function.
947-952: Error tracking updated with error nameError tracking was updated to include an error name that identifies the specific type of error, improving error categorization and debugging.
-Sentry.captureException( +captureException( new Error( `INVALID_DynamicPathBinding_CLIENT_ERROR: Invalid dynamic path binding list: ${currentDSL.widgetName}.${dBindingPath.key}`, ), + { errorName: "InvalidDynamicPathBinding" }, );app/client/src/sagas/WidgetLoadingSaga.ts (2)
19-19: Import changed from Sentry to custom error trackingThe import for error tracking has been changed from Sentry to a custom error capturing function.
104-104: Error tracking updated to include saga nameError tracking was updated to include the saga name as context, which improves error identification in asynchronous code paths.
-Sentry.captureException(e); +captureException(e, { errorName: "WidgetLoadingError" });app/client/src/sagas/AppThemingSaga.tsx (2)
47-47: Import statement updated correctly.The Sentry import has been properly replaced with the new Faro error reporting mechanism.
129-138: Error handling refactored to use Faro properly.The previous Sentry call has been correctly replaced with the new captureException function, maintaining the same error context while adding structured error information with the errorName "ThemeFetchError". The additional context (applicationVersion and userDetails) enhances error traceability.
app/client/src/pages/UserAuth/VerifyUser.tsx (2)
9-9: Import statement updated correctly.The Sentry import has been properly replaced with the new Faro error reporting mechanism.
27-29: Error handling updated to use structured Faro error reporting.The previous Sentry message capture has been correctly replaced with a more structured approach using Error object and errorName parameter. This provides better error categorization and traceability.
app/client/src/pages/UserAuth/helpers.ts (2)
8-8: Import statement updated correctly.The Sentry import has been properly replaced with the new Faro error reporting mechanism.
98-100: Structured error reporting implemented properly.The code now uses a more structured approach with an Error object and specific errorName parameter, improving error categorization and traceability compared to the previous Sentry implementation.
app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx (2)
31-31: Import statement updated correctly.The Sentry import has been properly replaced with the new Faro error reporting mechanism.
293-296: PreparedStatementViewer error handling updated properly.The previous Sentry error capture has been correctly replaced with the new structured approach using an Error object with errorName. The extra context is preserved, maintaining the same error reporting capabilities.
app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2)
172-172: Import statement updated for the error tracking libraryThe import statement has been updated to use the new Faro error tracking library instead of Sentry.
992-998: Error tracking enhanced with additional contextThe error capture now includes a specific error name "MissingJSCollection", which improves error identification and categorization in the monitoring system.
app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx (4)
32-32: Migrated to Faro error trackingThe import has been updated to use the new Faro error tracking library instead of Sentry.
192-192: Added contextual error informationError tracking has been enhanced with a specific error name "WDSCurrencyInputWidget" for better error categorization and troubleshooting.
251-251: Added contextual error informationError tracking has been enhanced with a specific error name for better error categorization and troubleshooting.
314-314: Added contextual error informationError tracking has been enhanced with a specific error name for better error categorization and troubleshooting.
app/client/src/reducers/evaluationReducers/treeReducer.ts (2)
6-6: Migrated to Faro error trackingThe import has been updated to use the new Faro error tracking library instead of Sentry.
35-37: Enhanced error tracking with contextual informationThe error capture now includes an error name "TreeReducer", which improves error identification and debugging in the monitoring system.
app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx (2)
23-23: Migrated to Faro error trackingThe import has been updated to use the new Faro error tracking library instead of Sentry.
240-240: Enhanced error tracking with contextual informationError tracking has been enhanced with a specific error name "TableWidgetV2_InlineCellEditor" for better error categorization and troubleshooting.
app/client/src/widgets/MapChartWidget/component/utilities.ts (2)
6-6: Import replaced: Sentry with captureExceptionThe import statement has been updated to use the new error handling mechanism from
instrumentation/sendFaroErrors.
78-80: Error reporting migrated from Sentry to FaroThe error capturing mechanism has been updated to use the new
captureExceptionfunction with an explicit error name parameter for better categorization.app/client/src/workers/Evaluation/errorModifier.ts (2)
16-16: Import replaced: Sentry with captureExceptionThe import statement has been updated to use the new error reporting mechanism from
instrumentation/sendFaroErrors.
227-227: Error reporting migrated from Sentry to FaroThe error capturing mechanism has been updated to use the new
captureExceptionfunction with the explicit error name "ErrorModifier_StringifyError" for better categorization.app/client/src/sagas/EvalErrorHandler.ts (3)
20-20: Import replaced: Sentry with captureExceptionThe import statement has been updated to use the new error reporting mechanism from
instrumentation/sendFaroErrors.
235-237: Error reporting migrated from Sentry to FaroThe cyclical dependency error capture has been updated to use the new
captureExceptionfunction with specific error naming.
268-268: Consistent error reporting migration across all error typesAll error type handlers have been systematically updated to use the new
captureExceptionfunction with appropriate error names for better categorization and tracking.Also applies to: 273-273, 277-277, 283-285, 299-302, 306-308, 314-314
app/client/src/components/propertyControls/PrimaryColumnsControlV2.tsx (1)
551-553: Performance profiling wrapper removedThe Sentry profiler wrapper has been removed from the component, which means performance data will no longer be collected for this component through Sentry.
app/client/src/components/propertyControls/PrimaryColumnsControl.tsx (1)
409-411: Removed Sentry profiling wrapperThe Sentry profiler wrapper has been removed from the
EvaluatedValuePopupWrappercomponent as part of the migration from Sentry to Faro for error tracking and profiling.app/client/src/instrumentation/index.ts (5)
26-30: Global window declaration for faro implementationAppropriate type declaration for global window interface to include the faro property.
45-77: Enhanced error handling in faro initializationThe initialization of faro is now wrapped in a try-catch block and checks for an existing window.faro instance to prevent duplicate initialization. This is a robust approach to error handling during initialization.
79-79: Unified faro instance assignmentSetting faro to window.faro after initialization ensures consistent reference across the application.
89-102: Conditional tracer provider registrationAdded conditional check before registering tracer provider, ensuring these operations only run if faro is successfully initialized.
115-115: Export faro for external accessExported the faro instance to make it available for other modules, enabling error tracking throughout the application.
app/client/src/sagas/InitSagas.ts (4)
95-95: Replaced Sentry with Faro for error trackingImported the new captureException utility from Faro's error handling system.
281-287: Enhanced error context for API failuresReplaced Sentry's captureMessage with Faro's captureException, adding a specific errorName and additional context about the original error. This provides better error categorization and debugging information.
377-377: Consistent error handling for AppEngine errorsUpdated error capture method to use Faro with appropriate error context naming.
474-474: Enhanced session validation error reportingUpdated session validation error reporting to use the new error capture system with specific error naming.
app/client/src/ce/utils/AnalyticsUtil.tsx (3)
12-12: Updated import for error tracking utilityRenamed import from SentryUtil to FaroUtil while maintaining the same import path, suggesting the file was renamed or its implementation was changed.
34-34: Disabled Sentry initializationCommented out SentryUtil.init() as part of the migration from Sentry to Faro. Initialization is likely handled in the instrumentation module now.
97-97: Updated user identification methodReplaced SentryUtil.identifyUser with FaroUtil.identifyUser to maintain user context tracking with the new error handling system.
app/client/src/utils/Analytics/sentry.ts (4)
1-1: Good use of the new error capturing approach.
Replacing Sentry imports withinstrumentation/sendFaroErrorsis consistent with the overall transition.
4-6: No-op init method confirmed.
Making theinit()method a no-op is aligned with removing Sentry setup.
18-20: Consistent exception capturing.
UsingcaptureExceptionfrominstrumentation/sendFaroErrorsadheres to the new error reporting system.
10-15:Details
❓ Verification inconclusive
Ensure
window.faroreadiness.
While setting the user context is straightforward, confirm thatwindow.farois always initialized before callingsetUser.
🏁 Script executed:
#!/bin/bash # Checking for any fallback or related references to window.faro in the codebase rg 'window\.faro'Length of output: 298
Review Verification: Ensure
window.faroIs Ready When Setting User ContextThe use of the optional chaining operator (
window.faro?.api.setUser) inapp/client/src/utils/Analytics/sentry.tsprevents runtime errors ifwindow.farois not yet initialized. However, please verify that this behavior aligns with the intended analytics flow. In particular:
- Confirm that delaying or skipping the user context setup (when
window.farois undefined) is acceptable in the context of error reporting.- Review the initialization timing of
window.faroand compare it with other parts of the code (e.g., the explicit check inapp/client/src/instrumentation/index.ts) to ensure consistency.- If user context is critical, consider implementing a readiness check or fallback to guarantee that
setUseris invoked whenwindow.farois available.
|
EE PR to test failures https://github.com/appsmithorg/appsmith-ee/pull/7086 |
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14401534892
Commit: cad5555
Cypress dashboard.
Tags:
@tag.AllSpec:
Fri, 11 Apr 2025 12:38:06 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Refactor
Chore