MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setJsDebugCommitId

Function setJsDebugCommitId

valdi/vscode_debugger/src/telemetry/classification.ts:246–253  ·  view source on GitHub ↗

* VS contains a file .gitcommit with the exact commit version being shipped. * We want to be able to easily track which commit telemetry came from, specially to translate error call stacks

(globalMetrics: IGlobalMetrics)

Source from the content-addressed store, hash-verified

244 * We want to be able to easily track which commit telemetry came from, specially to translate error call stacks
245 */
246 function setJsDebugCommitId(globalMetrics: IGlobalMetrics) {
247 try {
248 const filePath = path.resolve(path.dirname(__filename), '..', '..', '.gitcommit');
249 globalMetrics.jsDebugCommitId = fs.readFileSync(filePath, 'utf8');
250 } catch {
251 // We don't do anything if we don't have the file, or can't read it
252 }
253 }
254
255 return {
256 breakpointStats,

Callers 1

createLoggersFunction · 0.85

Calls 2

readFileSyncMethod · 0.80
resolveMethod · 0.65

Tested by

no test coverage detected