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

Add basic, anonymous telemetry which can be disabled with a command line argument #106

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

timrogers
Copy link
Owner

@timrogers timrogers commented Dec 8, 2023

This PR adds basic, anonymous telemetry to the extension to give the maintainers information about real-world usage. This data is limited to:

  • The number of exports and imports being run
  • The versions of GitHub Enterprise Server being used
  • The versions of the extension currently in used

You can disable all telemetry by specifying the --disable-telemetry argument.


🚀 This description was created by Ellipsis for commit 6ed3387

Summary:

Added anonymous telemetry to track usage metrics with an option to disable it via --disable-telemetry.

Key points:

  • Added anonymous telemetry using posthog-node in src/commands/export.ts and src/commands/import.ts.
  • Captures events export_start and import_start with GitHub Enterprise Server version and extension version.
  • Introduced --disable-telemetry option to disable telemetry in both export and import commands.
  • Updated README.md to document the new telemetry feature and --disable-telemetry option.
  • Modified GitHub Actions workflow in .github/workflows/end_to_end_tests.yml to use --disable-telemetry.
  • Added posthog-node dependency in package.json.
  • Created src/posthog.ts to store PostHog API key and host.

Generated with ❤️ by ellipsis.dev

@timrogers timrogers self-assigned this Dec 8, 2023
@timrogers timrogers force-pushed the timrogers/anonymous-telemetry branch from a9b5809 to 6ed3387 Compare December 8, 2023 22:57
@timrogers timrogers merged commit 17dbf1f into main Dec 8, 2023
@timrogers
Copy link
Owner Author

@ellipsis-dev review

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 6ed3387 in 36 seconds

More details
  • Looked at 292 lines of code in 6 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_i1yTOpPf0bENtQIM


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

6 days left in your free trial, upgrade for $20/seat/month or contact us.

@@ -0,0 +1,2 @@
export const POSTHOG_API_KEY = 'phc_qsDAq7TFrwaOraJHwetEyRiYqxBun5IG44s8JBIXdUI';
Copy link

Choose a reason for hiding this comment

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

The PostHog API key is hardcoded, which is a security risk. Consider using environment variables to store sensitive information securely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant