Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Feature/telemetry #43

Merged
merged 4 commits into from
Sep 27, 2023
Merged

Feature/telemetry #43

merged 4 commits into from
Sep 27, 2023

Conversation

baristaGeek
Copy link
Contributor

Description

This PR inserts PostHog tracking to the plugin itself. Unlike what we're already tracking, we are able to track local usage (pre-authentication usage) as we do on VS Code.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Chore: cleanup/renaming, etc
  • RFC

Notes

Gradle doesn't allow us to retrieve environment variables from gradle.properties on any file as the gradle configuration file (build.gradle.kts) does or as we do on NextJS by retrieving variables from a .env file. Whenever we build and publish we have to insert the Posthog API key manually. Running without the proper API key inserted doesn't produce any breaking change and the plugin runs normally.

Acceptance

@watermelon-copilot-for-code-review

WatermelonAI Summary

The four commits in this Pull Request are focused on adding PostHog tracking to the plugin. The first commit adds the PostHog dependency and sends the first event with a unique identifier. The second commit tracks the activation of the application. The third commit tracks the login action. And the fourth commit solves an issue related to storing and retrieving environment variables by forcing the developer to manually insert the PostHog API key. This implementation enables tracking of local usage before authentication, similar to how it is done in VS Code.

GitHub PRs

Click here to login to Jira
Click here to login to Confluence
Click here to login to Slack
Notion Pages deactivated by baristaGeek
Linear Tickets deactivated by baristaGeek
Click here to login to Asana
watermelon-intellij is an open repo and Watermelon will serve it for free.
🍉🫶

Copy link
Member

@EstebanDalelR EstebanDalelR left a comment

Choose a reason for hiding this comment

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

I'd do it as:
posthog.capture(PermanentInstallationID.get(), "intelliJ:nameOfEvent");
unless that is an async operation

@EstebanDalelR
Copy link
Member

closes #39

@baristaGeek baristaGeek merged commit 5debcd2 into dev Sep 27, 2023
5 of 6 checks passed
@baristaGeek baristaGeek mentioned this pull request Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants