Skip to content
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: removes unused js events #31800

Merged
merged 3 commits into from Mar 15, 2024
Merged

Conversation

rohan-arthur
Copy link
Contributor

@rohan-arthur rohan-arthur commented Mar 14, 2024

Description

Tracking of certain user actions tend to pollute our Mixpanel dashboard instead of providing meaningful insights. The following Mixpanel events add very little value and hence should be removed immediately:

CONSOLE_LOG_CREATED
AUTO_COMPLETE_SHOW

The issue mentions two more events:
BINDING_SUCCESS - doesn't seem to exist anymore, maybe already removed
JS_VARIABLE_MUTATED - a bit complicated to remove, will do this in a separate PR

Fixes #31728

Automation

/ok-to-test tags="@tag.Sanity, @tag.JS, @tag.Binding"

🔍 Cypress test results

Important

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8281028348
Commit: 4f1502191d03a5476473a1c911e011e3ad8ad1df
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

Summary by CodeRabbit

  • Refactor
    • Enhanced privacy by removing specific analytics logging for user-generated events.
  • Chores
    • Updated analytics event types by removing unused events.

Copy link
Contributor

coderabbitai bot commented Mar 14, 2024

Warning

Rate Limit Exceeded

@rohan-arthur has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 5 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between afa11d8 and 4f15021.

Walkthrough

The update to AppsmithConsole.ts simplifies the event logging mechanism by removing the AnalyticsUtil for events categorized under LOG_CATEGORY.USER_GENERATED. This adjustment streamlines the process by directly dispatching an action for logging, thereby reducing unnecessary analytics tracking that cluttered the dashboard with low-value data.

Changes

File Change Summary
app/client/src/utils/AppsmithConsole.ts Removed AnalyticsUtil usage for LOG_CATEGORY.USER_GENERATED events; directly dispatches an action now.

Assessment against linked issues

Objective Addressed Explanation
Fix Mixpanel tracking by removing low-value events (#31728)
Eliminate redundant API calls and duplicate events in various scenarios (#16650) The change does not directly address API call optimizations or the elimination of duplicate events as described.

Related issues

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added FE Coders Pod Issues related to users writing javascript in appsmith High This issue blocks a user from building or impacts a lot of users Integrations Pod Issues related to a specific integration Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. JS Evaluation Issues related to JS evaluation on the platform Task A simple Todo skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Mar 14, 2024
@rohan-arthur rohan-arthur self-assigned this Mar 14, 2024
@rohan-arthur rohan-arthur added the ok-to-test Required label for CI label Mar 14, 2024
@rohan-arthur
Copy link
Contributor Author

/build-deploy-preview skip-test=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8281043257.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 31800.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-31800.dp.appsmith.com

@rohan-arthur
Copy link
Contributor Author

tested:

  1. adding statement in js function console.log("hi")
  2. added input widget and tried referencing it via auto complete in js function

in both cases, there were no changes in experience and no errors on browser console.

Copy link
Contributor

@rishabhrathod01 rishabhrathod01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good to me.

@rohan-arthur Could we please create a task to remove JS_VARIABLE_MUTATED analytic event.

@rohan-arthur rohan-arthur merged commit 9d25c36 into release Mar 15, 2024
54 checks passed
@rohan-arthur rohan-arthur deleted the chore/31728-remove-unused-events branch March 15, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE Coders Pod Issues related to users writing javascript in appsmith High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Pod Issues related to a specific integration JS Evaluation Issues related to JS evaluation on the platform ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Mixpanel tracking
2 participants