-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix this.rootSpan undefined bug in PageLoadInstrumentation #36459
chore: fix this.rootSpan undefined bug in PageLoadInstrumentation #36459
Conversation
WalkthroughThe Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10959785026. |
Deploy-Preview-URL: https://ce-36459.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10960255947. |
Deploy-Preview-URL: https://ce-36459.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10960910680. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
app/client/src/UITelemetry/PageLoadInstrumentation.ts (1)
71-74
: Theenable
method looks good, but let's tidy it up a bit. 🧹Since the method is intentionally left empty, we can remove the empty lines to keep the code clean and concise. Here's a quick suggestion:
enable() { - // enable method is present in the base class and needs to be implemented - // Leaving it empty as there is no need to do anything here + // Required by the base class, intentionally left empty }
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/src/UITelemetry/PageLoadInstrumentation.ts (2 hunks)
Additional comments not posted (1)
app/client/src/UITelemetry/PageLoadInstrumentation.ts (1)
Line range hint
49-69
: Excellent work on theinit
method, class! 👏The initialization logic looks spot-on. You've done a great job of registering the necessary listeners, adding device attributes, and setting up the observation of resource timings. Keep up the good work!
Deploy-Preview-URL: https://ce-36459.dp.appsmith.com |
Description
The issue occurs because this.rootSpan is undefined when the enable method is called. This PR resolves the issue by moving all the initialization methods from the enable function to the init function, and then calling the init function from the constructor. The root cause of this issue is that the parent class constructor calls the enable method, and the root span is initialized afterward. Therefore, we cannot use the enable function for initialization code.
Fixes #
Issue Number
or
Fixes
Issue URL
Warning
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.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10960896859
Commit: d40ebc1
Cypress dashboard.
Tags:
@tag.Sanity
Spec:
Fri, 20 Sep 2024 14:53:02 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
enable
method for future functionality.Bug Fixes