Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,8 @@ When disabled, no data is collected or sent.
- Uses [Azure Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview) for analytics
- GDPR compliant with automatic PII sanitization
- All telemetry code is open source in this repository

### Developer Setup (Telemetry)

To enable telemetry during development:

1. Create an Application Insights resource in Azure Portal
2. Copy the connection string from the resource
3. Set the environment variable:
```bash
# macOS/Linux
export APP_INSIGHTS_KEY="your-connection-string"

# Windows (PowerShell)
$env:APP_INSIGHTS_KEY="your-connection-string"
```
4. Restart VS Code to pick up the environment variable

For production deployments, set the `APP_INSIGHTS_KEY` environment variable in your deployment environment or use GitHub Secrets for CI/CD pipelines.
- Application Insights key is included in the extension (standard practice for client-side telemetry)
- Rate limiting and security are handled server-side by Azure

## License

Expand Down
14 changes: 5 additions & 9 deletions src/config/telemetry.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
/**
* Telemetry configuration for ML Workbench extension
*
* IMPORTANT: Replace with your actual Application Insights instrumentation key
* or use environment variable for production deployments.
* Application Insights keys are designed for client-side use and safe to include
* in published extensions. Rate limiting and security are handled server-side by Azure.
*
* To create an Application Insights resource:
* 1. Go to Azure Portal (portal.azure.com)
* 2. Create new Application Insights resource
* 3. Copy the Instrumentation Key
* 4. Set APP_INSIGHTS_KEY environment variable or replace below
* Environment variable (APP_INSIGHTS_KEY) can override for development/testing.
*/

export const TELEMETRY_CONFIG = {
/**
* Application Insights connection string
* Must be set via APP_INSIGHTS_KEY environment variable
* Safe to include in source - designed for client-side use
*/
appInsightsKey: process.env.APP_INSIGHTS_KEY || '',
appInsightsKey: process.env.APP_INSIGHTS_KEY || 'InstrumentationKey=57b31524-522d-4291-aab6-ff38f89ddbdb;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/;ApplicationId=bd35885e-0019-417f-96c7-8abe4d62a95e',

/**
* Enable/disable telemetry globally (still respects VS Code user setting)
Expand Down