-
Notifications
You must be signed in to change notification settings - Fork 203
Add telemetry for commands #611
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
Merged
Changes from all commits
Commits
Show all changes
4 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
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Telemetry in the CodeQL extension for VS Code | ||
|
||
If you specifically opt-in to permit GitHub to do so, GitHub will collect usage data and metrics for the purposes of helping the core developers to improve the CodeQL extension for VS Code. This data will not be shared with any parties outside of GitHub. IP addresses and installation IDs will be retained for a maximum of 30 days. Anonymous data will be retained for a maximum of 180 days. | ||
sj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Why do you collect data? | ||
|
||
GitHub collects aggregated, anonymous usage data and metrics to help us improve CodeQL for VS Code. IP addresses and installation IDs are collected only to ensure that anonymous data is not duplicated during aggregation. | ||
|
||
## What data is collected | ||
|
||
If you opt in, GitHub collects the following information related to the usage of the extension. The data collected are: | ||
|
||
- The identifiers of any CodeQL-related [VS Code commands](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_command-palette) that are run | ||
- For each command: the timestamp, time taken, and whether or not the command completed successfully | ||
- VS Code and extension version | ||
- Randomly generated GUID that uniquely identifies a CodeQL extension installation. (Discarded before aggregation.) | ||
- IP address of the client sending the telemetry data. (Discarded before aggregation.) | ||
- Whether or not the `codeQL.canary` setting is enabled and set to `true` | ||
|
||
## How long will data be retained? | ||
|
||
IP address and GUIDs will be retained for a maximum of 30 days. Anonymous, aggregated data that includes command identifiers, run times, and timestamps will be retained for a maximum of 180 days. | ||
|
||
## Who will have access to this data? | ||
|
||
IP address and GUIDs will only be available to the core developers of CodeQL. Aggregated data will be available to GitHub employees. | ||
|
||
## What data is **NOT** collected? | ||
|
||
We only collect the minimal amount of data we need to answer the questions about how our users are experiencing this product. To that end, we do not collect the following information: | ||
|
||
- No GitHub user ID | ||
- No CodeQL database names or contents | ||
- No contents of CodeQL queries | ||
- No filesystem paths. | ||
|
||
## How do I disable telemetry reporting? | ||
aeisenberg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
When telemetry collection is disabled, no data will be sent to GitHub servers. | ||
|
||
You can disable telemetry collection by setting `codeQL.telemetry.enableTelemetry` to `false` in [your settings](https://code.visualstudio.com/docs/getstarted/settings#_settings-editor). Telemetry collection is _disabled_ by default. | ||
|
||
Additionally, telemetry collection will be disabled if the global `telemetry.enableTelemetry` setting is set to `false`. For more information on global telemetry collection, see [Microsoft’s documentation](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting). | ||
|
||
## More information | ||
|
||
See GitHub's [Privacy Statement](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-privacy-statement) and [Terms of Service](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-terms-of-service) for more information. |
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,16 @@ | ||
import * as gulp from 'gulp'; | ||
import * as replace from 'gulp-replace'; | ||
|
||
/** Inject the application insights key into the telemetry file */ | ||
export function injectAppInsightsKey() { | ||
if (!process.env.APP_INSIGHTS_KEY) { | ||
// noop | ||
console.log('APP_INSIGHTS_KEY environment variable is not set. So, cannot inject it into the application.'); | ||
return Promise.resolve(); | ||
} | ||
|
||
// replace the key | ||
return gulp.src(['out/telemetry.js']) | ||
.pipe(replace(/REPLACE-APP-INSIGHTS-KEY/, process.env.APP_INSIGHTS_KEY)) | ||
.pipe(gulp.dest('out/')); | ||
} |
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.
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.