diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index d06a791cc8e..7c64b24774d 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to experimental packages in this project will be documented ### :rocket: (Enhancement) * feat(instrumentation): re-export initialize function from import-in-the-middle [#5123](https://github.com/open-telemetry/opentelemetry-js/pull/5123) +* refactor(opentelemetry-sdk-node): lower diagnostic level [#5360](https://github.com/open-telemetry/opentelemetry-js/pull/5360) @cjihrig ### :bug: (Bug Fix) diff --git a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts index e3920bfa395..b07f400623a 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts @@ -116,7 +116,7 @@ function configureMetricProviderFromEnv(): MetricReader[] { const enabledExporters = filterBlanksAndNulls(metricsExporterList.split(',')); if (enabledExporters.length === 0) { - diag.info('OTEL_METRICS_EXPORTER is empty. Using default otlp exporter.'); + diag.debug('OTEL_METRICS_EXPORTER is empty. Using default otlp exporter.'); } if (enabledExporters.includes('none')) { @@ -449,7 +449,7 @@ export class NodeSDK { const enabledExporters = filterBlanksAndNulls(logExportersList.split(',')); if (enabledExporters.length === 0) { - diag.info('OTEL_LOGS_EXPORTER is empty. Using default otlp exporter.'); + diag.debug('OTEL_LOGS_EXPORTER is empty. Using default otlp exporter.'); enabledExporters.push('otlp'); } diff --git a/experimental/packages/opentelemetry-sdk-node/src/utils.ts b/experimental/packages/opentelemetry-sdk-node/src/utils.ts index 8b73744f489..3c1011b0b34 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/utils.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/utils.ts @@ -143,7 +143,7 @@ export function getSpanProcessorsFromEnv(): SpanProcessor[] { } if (traceExportersList.length === 0) { - diag.warn('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.'); + diag.debug('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.'); traceExportersList = ['otlp']; } else if ( traceExportersList.length > 1 && diff --git a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts index 52f326d7758..f93fb03b2a8 100644 --- a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts +++ b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts @@ -1136,7 +1136,7 @@ describe('Node SDK', () => { sdk.start(); assert.ok(!(metrics.getMeterProvider() instanceof MeterProvider)); assert.strictEqual( - stubLogger.args[1][0], + stubLogger.args[0][0], 'OTEL_METRICS_EXPORTER contains "none". Metric provider will not be initialized.' ); await sdk.shutdown();