Remove Sentry telemetry system from CodeGraph
Eliminates anonymous error reporting functionality that was collecting stack traces and error context via Sentry. Removes all telemetry-related code, configuration options, and documentation references.
This commit is contained in:
@@ -100,22 +100,18 @@ function writeJsonFile(filePath: string, data: Record<string, any>): void {
|
||||
/**
|
||||
* Get the MCP server configuration
|
||||
*/
|
||||
function getMcpServerConfig(options?: { telemetry?: boolean }): Record<string, any> {
|
||||
const config: Record<string, any> = {
|
||||
function getMcpServerConfig(): Record<string, any> {
|
||||
return {
|
||||
type: 'stdio',
|
||||
command: 'codegraph',
|
||||
args: ['serve', '--mcp'],
|
||||
};
|
||||
if (options?.telemetry === false) {
|
||||
config.env = { CODEGRAPH_TELEMETRY: 'off' };
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the MCP server configuration to claude.json
|
||||
*/
|
||||
export function writeMcpConfig(location: InstallLocation, options?: { telemetry?: boolean }): void {
|
||||
export function writeMcpConfig(location: InstallLocation): void {
|
||||
const claudeJsonPath = getClaudeJsonPath(location);
|
||||
const config = readJsonFile(claudeJsonPath);
|
||||
|
||||
@@ -125,7 +121,7 @@ export function writeMcpConfig(location: InstallLocation, options?: { telemetry?
|
||||
}
|
||||
|
||||
// Add or update codegraph server
|
||||
config.mcpServers.codegraph = getMcpServerConfig(options);
|
||||
config.mcpServers.codegraph = getMcpServerConfig();
|
||||
|
||||
writeJsonFile(claudeJsonPath, config);
|
||||
}
|
||||
|
||||
+2
-14
@@ -55,21 +55,9 @@ export async function runInstaller(): Promise<void> {
|
||||
const autoAllow = await promptAutoAllow();
|
||||
console.log();
|
||||
|
||||
// Step 4: Ask about anonymous error reporting
|
||||
console.log(chalk.bold(' Send anonymous error reports?') + chalk.dim(' (Helps fix bugs — no source code collected)'));
|
||||
console.log();
|
||||
const enableTelemetry = await promptConfirm('Enable anonymous error reporting', true);
|
||||
|
||||
if (!enableTelemetry) {
|
||||
info('Telemetry disabled');
|
||||
} else {
|
||||
success('Anonymous error reporting enabled');
|
||||
}
|
||||
console.log();
|
||||
|
||||
// Step 5: Write MCP configuration (includes telemetry env if opted out)
|
||||
// Step 4: Write MCP configuration
|
||||
const alreadyHasMcp = hasMcpConfig(location);
|
||||
writeMcpConfig(location, { telemetry: enableTelemetry });
|
||||
writeMcpConfig(location);
|
||||
|
||||
if (alreadyHasMcp) {
|
||||
success(`Updated MCP server in ${location === 'global' ? '~/.claude.json' : './.claude.json'}`);
|
||||
|
||||
Reference in New Issue
Block a user