Skip to content

Commit 279de52

Browse files
committed
fix lint errors
1 parent cab9e49 commit 279de52

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/src/aws-opentelemetry-configurator.ts

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
import { TextMapPropagator, diag } from '@opentelemetry/api';
66
import { getResourceDetectors as getResourceDetectorsFromEnv } from '@opentelemetry/auto-instrumentations-node';
7-
import { CompositePropagator, ENVIRONMENT, TracesSamplerValues, getEnv, getEnvWithoutDefaults, W3CBaggagePropagator, W3CTraceContextPropagator } from '@opentelemetry/core';
7+
import {
8+
CompositePropagator,
9+
ENVIRONMENT,
10+
TracesSamplerValues,
11+
getEnv,
12+
getEnvWithoutDefaults,
13+
W3CBaggagePropagator,
14+
W3CTraceContextPropagator,
15+
} from '@opentelemetry/core';
816
import { OTLPMetricExporter as OTLPGrpcOTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc';
917
import {
1018
AggregationTemporalityPreference,
@@ -199,36 +207,24 @@ export class AwsOpentelemetryConfigurator {
199207
}
200208

201209
private getPropagator(): TextMapPropagator {
202-
if (
203-
process.env.OTEL_PROPAGATORS == null ||
204-
process.env.OTEL_PROPAGATORS.trim() === ''
205-
) {
210+
if (process.env.OTEL_PROPAGATORS == null || process.env.OTEL_PROPAGATORS.trim() === '') {
206211
return new CompositePropagator({
207-
propagators: [
208-
new W3CTraceContextPropagator(),
209-
new W3CBaggagePropagator(),
210-
],
212+
propagators: [new W3CTraceContextPropagator(), new W3CBaggagePropagator()],
211213
});
212214
}
213215
const propagatorsFromEnv = Array.from(
214-
new Set(
215-
process.env.OTEL_PROPAGATORS?.split(',').map(value =>
216-
value.toLowerCase().trim(),
217-
),
218-
),
216+
new Set(process.env.OTEL_PROPAGATORS?.split(',').map(value => value.toLowerCase().trim()))
219217
);
220218
const propagators = propagatorsFromEnv.flatMap(propagatorName => {
221219
if (propagatorName === 'none') {
222220
diag.info(
223-
'Not selecting any propagator for value "none" specified in the environment variable OTEL_PROPAGATORS',
221+
'Not selecting any propagator for value "none" specified in the environment variable OTEL_PROPAGATORS'
224222
);
225223
return [];
226224
}
227225
const propagatorFactoryFunction = propagatorMap.get(propagatorName);
228226
if (propagatorFactoryFunction == null) {
229-
diag.warn(
230-
`Invalid propagator "${propagatorName}" specified in the environment variable OTEL_PROPAGATORS`,
231-
);
227+
diag.warn(`Invalid propagator "${propagatorName}" specified in the environment variable OTEL_PROPAGATORS`);
232228
return [];
233229
}
234230
return propagatorFactoryFunction();

0 commit comments

Comments
 (0)