From b0657581f6b86f2c7b0b11676ebb5fdbee214850 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Tue, 26 Jul 2022 08:10:00 -0400 Subject: [PATCH] style: lint --- .../src/export/InMemoryMetricExporter.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/experimental/packages/opentelemetry-sdk-metrics-base/src/export/InMemoryMetricExporter.ts b/experimental/packages/opentelemetry-sdk-metrics-base/src/export/InMemoryMetricExporter.ts index 11a6330ec06..c0ec67e74ab 100644 --- a/experimental/packages/opentelemetry-sdk-metrics-base/src/export/InMemoryMetricExporter.ts +++ b/experimental/packages/opentelemetry-sdk-metrics-base/src/export/InMemoryMetricExporter.ts @@ -41,16 +41,12 @@ export class InMemoryMetricExporter implements PushMetricExporter { export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void { // Avoid storing metrics when exporter is shutdown if (this. _shutdown) { - setTimeout(() => { - resultCallback({ code: ExportResultCode.FAILED }) - }, 0); + setTimeout(() => resultCallback({ code: ExportResultCode.FAILED }), 0); return; } this._metrics.push(metrics); - setTimeout(() => { - resultCallback({ code: ExportResultCode.SUCCESS }) - }, 0); + setTimeout(() => resultCallback({ code: ExportResultCode.SUCCESS }), 0); } /** @@ -61,7 +57,7 @@ export class InMemoryMetricExporter implements PushMetricExporter { return this._metrics; } - async forceFlush() { + forceFlush(): Promise { return Promise.resolve(); }