diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py index 86301306bc0..97de4fb1001 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -356,7 +356,7 @@ def _import_id_generator(id_generator_name: str) -> IdGenerator: def _initialize_components( auto_instrumentation_version: Optional[str] = None, - span_exporter_names: Optional[List[str]] = None, + trace_exporter_names: Optional[List[str]] = None, metric_exporter_names: Optional[List[str]] = None, log_exporter_names: Optional[List[str]] = None, sampler: Optional[Sampler] = None, @@ -364,14 +364,14 @@ def _initialize_components( id_generator: IdGenerator = None, logging_enabled: Optional[bool] = None, ): - if span_exporter_names is None: - span_exporter_names = [] + if trace_exporter_names is None: + trace_exporter_names = [] if metric_exporter_names is None: metric_exporter_names = [] if log_exporter_names is None: log_exporter_names = [] span_exporters, metric_exporters, log_exporters = _import_exporters( - span_exporter_names + _get_exporter_names("traces"), + trace_exporter_names + _get_exporter_names("traces"), metric_exporter_names + _get_exporter_names("metrics"), log_exporter_names + _get_exporter_names("logs"), ) diff --git a/opentelemetry-sdk/tests/test_configurator.py b/opentelemetry-sdk/tests/test_configurator.py index fc743fa1af9..403b1eff005 100644 --- a/opentelemetry-sdk/tests/test_configurator.py +++ b/opentelemetry-sdk/tests/test_configurator.py @@ -735,7 +735,7 @@ def test_initialize_components_kwargs( resource_mock.create.return_value = "TEST_RESOURCE" kwargs = { "auto_instrumentation_version": "auto-version", - "span_exporter_names": ["custom_span_exporter"], + "trace_exporter_names": ["custom_span_exporter"], "metric_exporter_names": ["custom_metric_exporter"], "log_exporter_names": ["custom_log_exporter"], "sampler": "TEST_SAMPLER",