Skip to content

Commit

Permalink
refactor(opentelemetry-sdk-node): remove redundant judgments for metric
Browse files Browse the repository at this point in the history
Signed-off-by: rickyes <0x19951125@gmail.com>
  • Loading branch information
rickyes committed Dec 4, 2021
1 parent 3959386 commit 962453d
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 962453d

Please sign in to comment.