[v10.3.x] Echo: Suppress errors from frontend-metrics API call failing (#89497)

Echo: Don't notify if PerformanceBackend errors when flushing (#89379)

(cherry picked from commit b43411631b)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-06-21 12:37:15 +03:00
committed by GitHub
co-authored by Josh Hunt
parent b3acdcd8ba
commit eafede49f8
@@ -32,9 +32,17 @@ export class PerformanceBackend implements EchoBackend<PerformanceEvent, Perform
return;
}
backendSrv.post('/api/frontend-metrics', {
events: this.buffer,
});
backendSrv
.post(
'/api/frontend-metrics',
{
events: this.buffer,
},
{ showErrorAlert: false }
)
.catch(() => {
// Just swallow this error - it's non-critical
});
this.buffer = [];
};