@@ -188,35 +188,23 @@ export class AwsOpentelemetryConfigurator {
188188 }
189189
190190 public configure ( ) : Partial < NodeSDKConfiguration > {
191- let config : Partial < NodeSDKConfiguration > ;
192- if ( AwsOpentelemetryConfigurator . isApplicationSignalsEnabled ( ) ) {
193- // config.autoDetectResources is set to False, as the resources are detected and added to the
194- // resource ahead of time. The resource is needed to be populated ahead of time instead of letting
195- // the OTel Node SDK do the population work because the constructed resource was required to build
196- // the sampler (if using XRay sampler) and the AwsMetricAttributesSpanExporter and AwsSpanMetricsProcessor
197- config = {
198- instrumentations : this . instrumentations ,
199- resource : this . resource ,
200- idGenerator : this . idGenerator ,
201- sampler : this . sampler ,
202- // Error message 'Exporter "otlp" requested through environment variable is unavailable.'
203- // will appear from BasicTracerProvider that is used in the OTel JS SDK, even though the
204- // span processors are specified
205- // https://github.com/open-telemetry/opentelemetry-js/issues/3449
206- spanProcessors : this . spanProcessors ,
207- autoDetectResources : false ,
208- textMapPropagator : this . propagator ,
209- } ;
210- } else {
211- // Default experience config
212- config = {
213- instrumentations : this . instrumentations ,
214- resource : this . resource ,
215- sampler : this . sampler ,
216- idGenerator : this . idGenerator ,
217- autoDetectResources : false ,
218- } ;
219- }
191+ // config.autoDetectResources is set to False, as the resources are detected and added to the
192+ // resource ahead of time. The resource is needed to be populated ahead of time instead of letting
193+ // the OTel Node SDK do the population work because the constructed resource was required to build
194+ // the sampler (if using XRay sampler) and the AwsMetricAttributesSpanExporter and AwsSpanMetricsProcessor
195+ const config : Partial < NodeSDKConfiguration > = {
196+ instrumentations : this . instrumentations ,
197+ resource : this . resource ,
198+ idGenerator : this . idGenerator ,
199+ sampler : this . sampler ,
200+ // Error message 'Exporter "otlp" requested through environment variable is unavailable.'
201+ // will appear from BasicTracerProvider that is used in the OTel JS SDK, even though the
202+ // span processors are specified
203+ // https://github.com/open-telemetry/opentelemetry-js/issues/3449
204+ spanProcessors : this . spanProcessors ,
205+ autoDetectResources : false ,
206+ textMapPropagator : this . propagator ,
207+ } ;
220208
221209 return config ;
222210 }
0 commit comments