diff --git a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts index 74c791fa6e..cf014d6bd2 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts @@ -84,14 +84,13 @@ export class NodeSDK { } if (configuration.metricExporter) { - const meterConfig: MeterConfig = {}; + const meterConfig: MeterConfig = { + exporter: configuration.metricExporter, + }; if (configuration.metricProcessor) { meterConfig.processor = configuration.metricProcessor; } - if (configuration.metricExporter) { - meterConfig.exporter = configuration.metricExporter; - } if (typeof configuration.metricInterval === 'number') { meterConfig.interval = configuration.metricInterval; }