Skip to content

Commit d5e6272

Browse files
Merge branch 'main' into erikarowland/zero-2588-track-machine-information
2 parents ac87f7e + 51aa365 commit d5e6272

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'vercel': patch
3+
---
4+
5+
Add support for telemetry debugging via VERCEL_TELEMETRY_DEBUG. Telemetry collection is not currently enabled and when it is, will be a major version bump for the CLI.

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const main = async () => {
245245
}
246246

247247
const telemetryEventStore = new TelemetryEventStore({
248-
isDebug: isDebugging,
248+
isDebug: process.env.VERCEL_TELEMETRY_DEBUG === '1',
249249
output,
250250
config: config.telemetry,
251251
});

packages/cli/src/util/telemetry/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ export class TelemetryEventStore {
178178

179179
save() {
180180
if (this.isDebug) {
181-
this.output.debug(`${LogLabel} Flushing Events`);
181+
// Intentionally not using `this.output.debug` as it will
182+
// not write to stderr unless it is run with `--debug`
183+
this.output.log(`${LogLabel} Flushing Events`);
182184
this.events.forEach(event => {
183-
this.output.debug(JSON.stringify(event));
185+
this.output.log(JSON.stringify(event));
184186
});
185187
}
186188
if (this.enabled()) {

0 commit comments

Comments
 (0)