Skip to content

Commit

Permalink
refactor(opentelemetry-sdk-node): remove redundant judgments for metr…
Browse files Browse the repository at this point in the history
…ic (#2648)
  • Loading branch information
rickyes authored Dec 6, 2021
1 parent 3959386 commit b9e7835
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions experimental/packages/opentelemetry-sdk-node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b9e7835

Please sign in to comment.