refactor(opentelemetry-sdk-node): remove redundant judgments for metric (#2648)
This commit is contained in:
parent
3959386463
commit
b9e7835716
|
|
@ -84,14 +84,13 @@ export class NodeSDK {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configuration.metricExporter) {
|
if (configuration.metricExporter) {
|
||||||
const meterConfig: MeterConfig = {};
|
const meterConfig: MeterConfig = {
|
||||||
|
exporter: configuration.metricExporter,
|
||||||
|
};
|
||||||
|
|
||||||
if (configuration.metricProcessor) {
|
if (configuration.metricProcessor) {
|
||||||
meterConfig.processor = configuration.metricProcessor;
|
meterConfig.processor = configuration.metricProcessor;
|
||||||
}
|
}
|
||||||
if (configuration.metricExporter) {
|
|
||||||
meterConfig.exporter = configuration.metricExporter;
|
|
||||||
}
|
|
||||||
if (typeof configuration.metricInterval === 'number') {
|
if (typeof configuration.metricInterval === 'number') {
|
||||||
meterConfig.interval = configuration.metricInterval;
|
meterConfig.interval = configuration.metricInterval;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue