Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpod-io/gitpod
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 65d3450b1d93b4a74a987aabf950830ce424472c
Choose a base ref
..
head repository: gitpod-io/gitpod
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3c77b9d329beb56af31b11c75c4e1ae9e4ef2800
Choose a head ref
Showing with 5 additions and 1 deletion.
  1. +5 −1 components/public-api/typescript/src/metrics.ts
6 changes: 5 additions & 1 deletion components/public-api/typescript/src/metrics.ts
Original file line number Diff line number Diff line change
@@ -308,6 +308,9 @@ export class MetricsReporter {
if (!enabled) {
return;
}
if (typeof window !== undefined && !window.navigator.onLine) {
return;
}

const metrics = await register.getMetricsAsJSON();
register.resetMetrics();
@@ -464,10 +467,11 @@ export class MetricsReporter {

private async send(request: MetricsRequest | undefined): Promise<void> {
if (!request) {
return request;
return;
}
if (typeof window !== undefined && !window.navigator.onLine) {
this.push(request);
return;
}
this.sendQueue = this.sendQueue.then(async () => {
try {