From 7046bbbcea513d128ec0f66b8592085132212512 Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Mon, 28 Oct 2024 22:16:27 +0000 Subject: [PATCH] no unhandled rejection --- packages/telemetry/src/otel-context-aware-slog.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/telemetry/src/otel-context-aware-slog.js b/packages/telemetry/src/otel-context-aware-slog.js index 51891460eba8..ece794c8f470 100644 --- a/packages/telemetry/src/otel-context-aware-slog.js +++ b/packages/telemetry/src/otel-context-aware-slog.js @@ -91,11 +91,13 @@ export const makeSlogSender = async options => { 10, ); - logger.emit({ - ...JSON.parse(serializeSlogObj(logRecord)), - severityNumber: SeverityNumber.INFO, - timestamp: [seconds, nanoSeconds], - }); + logger + .emit({ + ...JSON.parse(serializeSlogObj(logRecord)), + severityNumber: SeverityNumber.INFO, + timestamp: [seconds, nanoSeconds], + }) + .catch(() => {}); }; const shutdown = async () => {