Skip to content

Commit

Permalink
Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonWeber committed Jan 3, 2024
1 parent 0d5545b commit 02574b3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions experimental/packages/opentelemetry-sdk-node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ export class NodeSDK {
public constructor(configuration: Partial<NodeSDKConfiguration> = {}) {
const env = getEnv();
const envWithoutDefaults = getEnvWithoutDefaults();
const envExporterWithConfiguration = env.OTEL_TRACES_EXPORTER && (configuration.sampler || configuration.spanLimits || configuration.idGenerator);
const envExporterWithConfiguration =
env.OTEL_TRACES_EXPORTER &&
(configuration.sampler ||
configuration.spanLimits ||
configuration.idGenerator);

if (env.OTEL_SDK_DISABLED) {
this._disabled = true;
Expand All @@ -128,7 +132,11 @@ export class NodeSDK {
this._autoDetectResources = configuration.autoDetectResources ?? true;

// If there are configuration options to read, we need to create a new TracerProvider even if the exporter is configured in the environment
if ((configuration.traceExporter || configuration.spanProcessor) || envExporterWithConfiguration) {
if (
configuration.traceExporter ||
configuration.spanProcessor ||
envExporterWithConfiguration
) {
const tracerProviderConfig: NodeTracerConfig = {};

if (configuration.sampler) {
Expand Down

0 comments on commit 02574b3

Please sign in to comment.