Skip to content

Commit

Permalink
feat(sdk-node): lower diagnostic level (#5360)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
cjihrig and pichlermarc authored Jan 23, 2025
1 parent df49fb1 commit b4ae9ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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)
* feat(sdk-node): lower diagnostic level [#5360](https://github.com/open-telemetry/opentelemetry-js/pull/5360) @cjihrig

### :bug: (Bug Fix)

Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/opentelemetry-sdk-node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function configureMetricProviderFromEnv(): IMetricReader[] {
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')) {
Expand Down Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/opentelemetry-sdk-node/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b4ae9ca

Please sign in to comment.