-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Opt-in telemetry #1438
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
Merged
Opt-in telemetry #1438
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # PostHog API Keys for telemetry | ||
| POSTHOG_API_KEY=key-goes-here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ roo-cline-*.vsix | |
| docs/_site/ | ||
|
|
||
| # Dotenv | ||
| .env | ||
| .env.integration | ||
|
|
||
| #Local lint config | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,3 +48,6 @@ webview-ui/node_modules/** | |
|
|
||
| # Include icons | ||
| !assets/icons/** | ||
|
|
||
| # Include .env file for telemetry | ||
| !.env | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Roo Code Privacy Policy | ||
|
|
||
| **Last Updated: March 7th, 2025** | ||
|
|
||
| Roo Code respects your privacy and is committed to transparency about how we handle your data. Below is a simple breakdown of where key pieces of data go—and, importantly, where they don’t. | ||
|
|
||
| ### **Where Your Data Goes (And Where It Doesn’t)** | ||
|
|
||
| - **Code & Files**: Roo Code accesses files on your local machine when needed for AI-assisted features. When you send commands to Roo Code, relevant files may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not have access to this data, but AI providers may store it per their privacy policies. | ||
| - **Commands**: Any commands executed through Roo Code happen on your local environment. However, when you use AI-powered features, the relevant code and context from your commands may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not have access to or store this data, but AI providers may process it per their privacy policies. | ||
| - **Prompts & AI Requests**: When you use AI-powered features, your prompts and relevant project context are sent to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not store or process this data. These AI providers have their own privacy policies and may store data per their terms of service. | ||
| - **API Keys & Credentials**: If you enter an API key (e.g., to connect an AI model), it is stored locally on your device and never sent to us or any third party, except the provider you have chosen. | ||
| - **Telemetry (Usage Data)**: We only collect feature usage and error data if you explicitly opt-in. This telemetry is powered by PostHog and helps us understand feature usage to improve Roo Code. This includes your VS Code machine ID and feature usage patterns and exception reports. We do **not** collect personally identifiable information, your code, or AI prompts. | ||
|
|
||
| ### **How We Use Your Data (If Collected)** | ||
|
|
||
| - If you opt-in to telemetry, we use it to understand feature usage and improve Roo Code. | ||
| - We do **not** sell or share your data. | ||
| - We do **not** train any models on your data. | ||
|
|
||
| ### **Your Choices & Control** | ||
|
|
||
| - You can run models locally to prevent data being sent to third-parties. | ||
| - By default, telemetry collection is off and if you turn it on, you can opt out of telemetry at any time. | ||
| - You can delete Roo Code to stop all data collection. | ||
|
|
||
| ### **Security & Updates** | ||
|
|
||
| We take reasonable measures to secure your data, but no system is 100% secure. If our privacy policy changes, we will notify you within the extension. | ||
|
|
||
| ### **Contact Us** | ||
|
|
||
| For any privacy-related questions, reach out to us at [email protected]. | ||
|
|
||
| --- | ||
|
|
||
| By using Roo Code, you agree to this Privacy Policy. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ import { McpHub } from "../services/mcp/McpHub" | |
| import crypto from "crypto" | ||
| import { insertGroups } from "./diff/insert-groups" | ||
| import { OutputBuilder } from "../integrations/terminal/OutputBuilder" | ||
| import { telemetryService } from "../services/telemetry/TelemetryService" | ||
|
|
||
| const cwd = | ||
| vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution | ||
|
|
@@ -190,6 +191,12 @@ export class Cline { | |
| this.enableCheckpoints = enableCheckpoints | ||
| this.checkpointStorage = checkpointStorage | ||
|
|
||
| if (historyItem) { | ||
| telemetryService.captureTaskRestarted(this.taskId) | ||
| } else { | ||
| telemetryService.captureTaskCreated(this.taskId) | ||
| } | ||
|
|
||
| // Initialize diffStrategy based on current state | ||
| this.updateDiffStrategy( | ||
| Experiments.isEnabled(experiments ?? {}, EXPERIMENT_IDS.DIFF_STRATEGY), | ||
|
|
@@ -1446,6 +1453,10 @@ export class Cline { | |
| await this.browserSession.closeBrowser() | ||
| } | ||
|
|
||
| if (!block.partial) { | ||
| telemetryService.captureToolUsage(this.taskId, block.name) | ||
| } | ||
|
|
||
| // Validate tool use before execution | ||
| const { mode, customModes } = (await this.providerRef.deref()?.getState()) ?? {} | ||
| try { | ||
|
|
@@ -2897,14 +2908,6 @@ export class Cline { | |
| false, | ||
| ) | ||
|
|
||
| if (this.isSubTask) { | ||
| // tell the provider to remove the current subtask and resume the previous task in the stack (it might decide to run the command) | ||
| await this.providerRef | ||
| .deref() | ||
| ?.finishSubTask(`new_task finished successfully! ${lastMessage?.text}`) | ||
| break | ||
| } | ||
|
|
||
|
||
| await this.ask( | ||
| "command", | ||
| removeClosingTag("command", command), | ||
|
|
@@ -2936,6 +2939,7 @@ export class Cline { | |
| if (lastMessage && lastMessage.ask !== "command") { | ||
| // havent sent a command message yet so first send completion_result then command | ||
| await this.say("completion_result", result, undefined, false) | ||
| telemetryService.captureTaskCompleted(this.taskId) | ||
| if (this.isSubTask) { | ||
| // tell the provider to remove the current subtask and resume the previous task in the stack | ||
| await this.providerRef | ||
|
|
@@ -2960,6 +2964,7 @@ export class Cline { | |
| commandResult = execCommandResult | ||
| } else { | ||
| await this.say("completion_result", result, undefined, false) | ||
| telemetryService.captureTaskCompleted(this.taskId) | ||
| if (this.isSubTask) { | ||
| // tell the provider to remove the current subtask and resume the previous task in the stack | ||
| await this.providerRef | ||
|
|
@@ -3125,6 +3130,7 @@ export class Cline { | |
| userContent.push({ type: "text", text: environmentDetails }) | ||
|
|
||
| await this.addToApiConversationHistory({ role: "user", content: userContent }) | ||
| telemetryService.captureConversationMessage(this.taskId, "user") | ||
|
|
||
| // since we sent off a placeholder api_req_started message to update the webview while waiting to actually start the API request (to load potential details for example), we need to update the text of that message | ||
| const lastApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started") | ||
|
|
@@ -3326,6 +3332,7 @@ export class Cline { | |
| role: "assistant", | ||
| content: [{ type: "text", text: assistantMessage }], | ||
| }) | ||
| telemetryService.captureConversationMessage(this.taskId, "assistant") | ||
|
|
||
| // NOTE: this comment is here for future reference - this was a workaround for userMessageContent not getting set to true. It was due to it not recursively calling for partial blocks when didRejectTool, so it would get stuck waiting for a partial block to complete before it could continue. | ||
| // in case the content blocks finished | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.