We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TypeError: pop() takes no arguments (1 given) with otlp exporter 0.18b0
**Describe your environment** 
opentelemetry-sdk==1.0.0rc1
opentelemetry-exporter-otlp==1.0.0rc1
opentelemetry-exporter-jaeger==1.0.0rc1
opentelemetry-propagator-b3==1.0.0rc1
opentelemetry-distro==0.18b0
opentelemetry-instrumentation==0.18b0
opentelemetry-instrumentation-grpc==0.18b0
opentelemetry-instrumentation-jinja2==0.18b0

export OTEL_TRACES_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_INSECURE=true
export OTEL_EXPORTER_OTLP_ENDPOINT="markf-0398:4317"
export OTEL_RESOURCE_ATTRIBUTES="service.name=emailservice, environment=hipster_shop"

**Steps to reproduce**
I'm using this app, but I don't believe it makes any difference, given the error.
https://github.com/markfink-splunk/microservices-demo/tree/master/src/emailservice

**What is the expected behavior?**
otlp should initialize and export traces.

**What is the actual behavior?**
I get this error immediately upon executing "opentelemetry-instrument python email_server.py".

Configuration of configurator failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 74, in _load_configurators
    entry_point.load()().configure()  # type: ignore
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/configurator.py", line 50, in configure
    self._configure(**kwargs)
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 168, in _configure
    _initialize_components()
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 159, in _initialize_components
    exporter_names = _get_exporter_names()
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 73, in _get_exporter_names
    exporters.pop(EXPORTER_OTLP)
TypeError: pop() takes no arguments (1 given)
Failed to auto initialize opentelemetry
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 84, in initialize
    _load_configurators()
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 78, in _load_configurators
    raise exc
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 74, in _load_configurators
    entry_point.load()().configure()  # type: ignore
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/configurator.py", line 50, in configure
    self._configure(**kwargs)
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 168, in _configure
    _initialize_components()
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 159, in _initialize_components
    exporter_names = _get_exporter_names()
  File "/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py", line 73, in _get_exporter_names
    exporters.pop(EXPORTER_OTLP)
TypeError: pop() takes no arguments (1 given)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `opentelemetry-distro/src/opentelemetry/distro/__init__.py`
Content:
```
1 # Copyright The OpenTelemetry Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 import os
16 from logging import getLogger
17 from os import environ
18 from typing import Sequence, Tuple
19 
20 from pkg_resources import iter_entry_points
21 
22 from opentelemetry import trace
23 from opentelemetry.environment_variables import (
24     OTEL_PYTHON_ID_GENERATOR,
25     OTEL_PYTHON_SERVICE_NAME,
26     OTEL_TRACES_EXPORTER,
27 )
28 from opentelemetry.instrumentation.configurator import BaseConfigurator
29 from opentelemetry.instrumentation.distro import BaseDistro
30 from opentelemetry.sdk.resources import Resource
31 from opentelemetry.sdk.trace import TracerProvider
32 from opentelemetry.sdk.trace.export import BatchSpanProcessor, SpanExporter
33 from opentelemetry.sdk.trace.id_generator import IdGenerator
34 
35 logger = getLogger(__file__)
36 
37 
38 EXPORTER_OTLP = "otlp"
39 EXPORTER_OTLP_SPAN = "otlp_span"
40 
41 RANDOM_ID_GENERATOR = "random"
42 _DEFAULT_ID_GENERATOR = RANDOM_ID_GENERATOR
43 
44 
45 def _get_id_generator() -> str:
46     return environ.get(OTEL_PYTHON_ID_GENERATOR, _DEFAULT_ID_GENERATOR)
47 
48 
49 def _get_service_name() -> str:
50     return environ.get(OTEL_PYTHON_SERVICE_NAME, "")
51 
52 
53 def _get_exporter_names() -> Sequence[str]:
54     trace_exporters = environ.get(OTEL_TRACES_EXPORTER)
55 
56     exporters = set()
57 
58     if (
59         trace_exporters is not None
60         or trace_exporters.lower().strip() != "none"
61     ):
62         exporters.update(
63             {
64                 trace_exporter.strip()
65                 for trace_exporter in trace_exporters.split(",")
66             }
67         )
68 
69     if EXPORTER_OTLP in exporters:
70         exporters.pop(EXPORTER_OTLP)
71         exporters.add(EXPORTER_OTLP_SPAN)
72 
73     return list(exporters)
74 
75 
76 def _init_tracing(
77     exporters: Sequence[SpanExporter], id_generator: IdGenerator
78 ):
79     service_name = _get_service_name()
80     provider = TracerProvider(
81         resource=Resource.create({"service.name": service_name}),
82         id_generator=id_generator(),
83     )
84     trace.set_tracer_provider(provider)
85 
86     for exporter_name, exporter_class in exporters.items():
87         exporter_args = {}
88         if exporter_name not in [
89             EXPORTER_OTLP,
90             EXPORTER_OTLP_SPAN,
91         ]:
92             exporter_args["service_name"] = service_name
93 
94         provider.add_span_processor(
95             BatchSpanProcessor(exporter_class(**exporter_args))
96         )
97 
98 
99 def _import_tracer_provider_config_components(
100     selected_components, entry_point_name
101 ) -> Sequence[Tuple[str, object]]:
102     component_entry_points = {
103         ep.name: ep for ep in iter_entry_points(entry_point_name)
104     }
105     component_impls = []
106     for selected_component in selected_components:
107         entry_point = component_entry_points.get(selected_component, None)
108         if not entry_point:
109             raise RuntimeError(
110                 "Requested component '{}' not found in entry points for '{}'".format(
111                     selected_component, entry_point_name
112                 )
113             )
114 
115         component_impl = entry_point.load()
116         component_impls.append((selected_component, component_impl))
117 
118     return component_impls
119 
120 
121 def _import_exporters(
122     exporter_names: Sequence[str],
123 ) -> Sequence[SpanExporter]:
124     trace_exporters = {}
125 
126     for (
127         exporter_name,
128         exporter_impl,
129     ) in _import_tracer_provider_config_components(
130         exporter_names, "opentelemetry_exporter"
131     ):
132         if issubclass(exporter_impl, SpanExporter):
133             trace_exporters[exporter_name] = exporter_impl
134         else:
135             raise RuntimeError(
136                 "{0} is not a trace exporter".format(exporter_name)
137             )
138     return trace_exporters
139 
140 
141 def _import_id_generator(id_generator_name: str) -> IdGenerator:
142     # pylint: disable=unbalanced-tuple-unpacking
143     [
144         (id_generator_name, id_generator_impl)
145     ] = _import_tracer_provider_config_components(
146         [id_generator_name.strip()], "opentelemetry_id_generator"
147     )
148 
149     if issubclass(id_generator_impl, IdGenerator):
150         return id_generator_impl
151 
152     raise RuntimeError("{0} is not an IdGenerator".format(id_generator_name))
153 
154 
155 def _initialize_components():
156     exporter_names = _get_exporter_names()
157     trace_exporters = _import_exporters(exporter_names)
158     id_generator_name = _get_id_generator()
159     id_generator = _import_id_generator(id_generator_name)
160     _init_tracing(trace_exporters, id_generator)
161 
162 
163 class Configurator(BaseConfigurator):
164     def _configure(self, **kwargs):
165         _initialize_components()
166 
167 
168 class OpenTelemetryDistro(BaseDistro):
169     """
170     The OpenTelemetry provided Distro configures a default set of
171     configuration out of the box.
172     """
173 
174     def _configure(self, **kwargs):
175         os.environ.setdefault(OTEL_TRACES_EXPORTER, "otlp_span")
176
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/opentelemetry-distro/src/opentelemetry/distro/__init__.py b/opentelemetry-distro/src/opentelemetry/distro/__init__.py
--- a/opentelemetry-distro/src/opentelemetry/distro/__init__.py
+++ b/opentelemetry-distro/src/opentelemetry/distro/__init__.py
@@ -67,7 +67,7 @@
         )
 
     if EXPORTER_OTLP in exporters:
-        exporters.pop(EXPORTER_OTLP)
+        exporters.remove(EXPORTER_OTLP)
         exporters.add(EXPORTER_OTLP_SPAN)
 
     return list(exporters)

{"golden_diff": "diff --git a/opentelemetry-distro/src/opentelemetry/distro/__init__.py b/opentelemetry-distro/src/opentelemetry/distro/__init__.py\n--- a/opentelemetry-distro/src/opentelemetry/distro/__init__.py\n+++ b/opentelemetry-distro/src/opentelemetry/distro/__init__.py\n@@ -67,7 +67,7 @@\n         )\n \n     if EXPORTER_OTLP in exporters:\n-        exporters.pop(EXPORTER_OTLP)\n+        exporters.remove(EXPORTER_OTLP)\n         exporters.add(EXPORTER_OTLP_SPAN)\n \n     return list(exporters)\n", "issue": "TypeError: pop() takes no arguments (1 given) with otlp exporter 0.18b0\n**Describe your environment** \r\nopentelemetry-sdk==1.0.0rc1\r\nopentelemetry-exporter-otlp==1.0.0rc1\r\nopentelemetry-exporter-jaeger==1.0.0rc1\r\nopentelemetry-propagator-b3==1.0.0rc1\r\nopentelemetry-distro==0.18b0\r\nopentelemetry-instrumentation==0.18b0\r\nopentelemetry-instrumentation-grpc==0.18b0\r\nopentelemetry-instrumentation-jinja2==0.18b0\r\n\r\nexport OTEL_TRACES_EXPORTER=\"otlp\"\r\nexport OTEL_EXPORTER_OTLP_INSECURE=true\r\nexport OTEL_EXPORTER_OTLP_ENDPOINT=\"markf-0398:4317\"\r\nexport OTEL_RESOURCE_ATTRIBUTES=\"service.name=emailservice, environment=hipster_shop\"\r\n\r\n**Steps to reproduce**\r\nI'm using this app, but I don't believe it makes any difference, given the error.\r\nhttps://github.com/markfink-splunk/microservices-demo/tree/master/src/emailservice\r\n\r\n**What is the expected behavior?**\r\notlp should initialize and export traces.\r\n\r\n**What is the actual behavior?**\r\nI get this error immediately upon executing \"opentelemetry-instrument python email_server.py\".\r\n\r\nConfiguration of configurator failed\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py\", line 74, in _load_configurators\r\n    entry_point.load()().configure()  # type: ignore\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/configurator.py\", line 50, in configure\r\n    self._configure(**kwargs)\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 168, in _configure\r\n    _initialize_components()\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 159, in _initialize_components\r\n    exporter_names = _get_exporter_names()\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 73, in _get_exporter_names\r\n    exporters.pop(EXPORTER_OTLP)\r\nTypeError: pop() takes no arguments (1 given)\r\nFailed to auto initialize opentelemetry\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py\", line 84, in initialize\r\n    _load_configurators()\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py\", line 78, in _load_configurators\r\n    raise exc\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py\", line 74, in _load_configurators\r\n    entry_point.load()().configure()  # type: ignore\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/instrumentation/configurator.py\", line 50, in configure\r\n    self._configure(**kwargs)\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 168, in _configure\r\n    _initialize_components()\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 159, in _initialize_components\r\n    exporter_names = _get_exporter_names()\r\n  File \"/usr/local/lib/python3.7/site-packages/opentelemetry/distro/__init__.py\", line 73, in _get_exporter_names\r\n    exporters.pop(EXPORTER_OTLP)\r\nTypeError: pop() takes no arguments (1 given)\r\n\n", "before_files": [{"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport os\nfrom logging import getLogger\nfrom os import environ\nfrom typing import Sequence, Tuple\n\nfrom pkg_resources import iter_entry_points\n\nfrom opentelemetry import trace\nfrom opentelemetry.environment_variables import (\n    OTEL_PYTHON_ID_GENERATOR,\n    OTEL_PYTHON_SERVICE_NAME,\n    OTEL_TRACES_EXPORTER,\n)\nfrom opentelemetry.instrumentation.configurator import BaseConfigurator\nfrom opentelemetry.instrumentation.distro import BaseDistro\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor, SpanExporter\nfrom opentelemetry.sdk.trace.id_generator import IdGenerator\n\nlogger = getLogger(__file__)\n\n\nEXPORTER_OTLP = \"otlp\"\nEXPORTER_OTLP_SPAN = \"otlp_span\"\n\nRANDOM_ID_GENERATOR = \"random\"\n_DEFAULT_ID_GENERATOR = RANDOM_ID_GENERATOR\n\n\ndef _get_id_generator() -> str:\n    return environ.get(OTEL_PYTHON_ID_GENERATOR, _DEFAULT_ID_GENERATOR)\n\n\ndef _get_service_name() -> str:\n    return environ.get(OTEL_PYTHON_SERVICE_NAME, \"\")\n\n\ndef _get_exporter_names() -> Sequence[str]:\n    trace_exporters = environ.get(OTEL_TRACES_EXPORTER)\n\n    exporters = set()\n\n    if (\n        trace_exporters is not None\n        or trace_exporters.lower().strip() != \"none\"\n    ):\n        exporters.update(\n            {\n                trace_exporter.strip()\n                for trace_exporter in trace_exporters.split(\",\")\n            }\n        )\n\n    if EXPORTER_OTLP in exporters:\n        exporters.pop(EXPORTER_OTLP)\n        exporters.add(EXPORTER_OTLP_SPAN)\n\n    return list(exporters)\n\n\ndef _init_tracing(\n    exporters: Sequence[SpanExporter], id_generator: IdGenerator\n):\n    service_name = _get_service_name()\n    provider = TracerProvider(\n        resource=Resource.create({\"service.name\": service_name}),\n        id_generator=id_generator(),\n    )\n    trace.set_tracer_provider(provider)\n\n    for exporter_name, exporter_class in exporters.items():\n        exporter_args = {}\n        if exporter_name not in [\n            EXPORTER_OTLP,\n            EXPORTER_OTLP_SPAN,\n        ]:\n            exporter_args[\"service_name\"] = service_name\n\n        provider.add_span_processor(\n            BatchSpanProcessor(exporter_class(**exporter_args))\n        )\n\n\ndef _import_tracer_provider_config_components(\n    selected_components, entry_point_name\n) -> Sequence[Tuple[str, object]]:\n    component_entry_points = {\n        ep.name: ep for ep in iter_entry_points(entry_point_name)\n    }\n    component_impls = []\n    for selected_component in selected_components:\n        entry_point = component_entry_points.get(selected_component, None)\n        if not entry_point:\n            raise RuntimeError(\n                \"Requested component '{}' not found in entry points for '{}'\".format(\n                    selected_component, entry_point_name\n                )\n            )\n\n        component_impl = entry_point.load()\n        component_impls.append((selected_component, component_impl))\n\n    return component_impls\n\n\ndef _import_exporters(\n    exporter_names: Sequence[str],\n) -> Sequence[SpanExporter]:\n    trace_exporters = {}\n\n    for (\n        exporter_name,\n        exporter_impl,\n    ) in _import_tracer_provider_config_components(\n        exporter_names, \"opentelemetry_exporter\"\n    ):\n        if issubclass(exporter_impl, SpanExporter):\n            trace_exporters[exporter_name] = exporter_impl\n        else:\n            raise RuntimeError(\n                \"{0} is not a trace exporter\".format(exporter_name)\n            )\n    return trace_exporters\n\n\ndef _import_id_generator(id_generator_name: str) -> IdGenerator:\n    # pylint: disable=unbalanced-tuple-unpacking\n    [\n        (id_generator_name, id_generator_impl)\n    ] = _import_tracer_provider_config_components(\n        [id_generator_name.strip()], \"opentelemetry_id_generator\"\n    )\n\n    if issubclass(id_generator_impl, IdGenerator):\n        return id_generator_impl\n\n    raise RuntimeError(\"{0} is not an IdGenerator\".format(id_generator_name))\n\n\ndef _initialize_components():\n    exporter_names = _get_exporter_names()\n    trace_exporters = _import_exporters(exporter_names)\n    id_generator_name = _get_id_generator()\n    id_generator = _import_id_generator(id_generator_name)\n    _init_tracing(trace_exporters, id_generator)\n\n\nclass Configurator(BaseConfigurator):\n    def _configure(self, **kwargs):\n        _initialize_components()\n\n\nclass OpenTelemetryDistro(BaseDistro):\n    \"\"\"\n    The OpenTelemetry provided Distro configures a default set of\n    configuration out of the box.\n    \"\"\"\n\n    def _configure(self, **kwargs):\n        os.environ.setdefault(OTEL_TRACES_EXPORTER, \"otlp_span\")\n", "path": "opentelemetry-distro/src/opentelemetry/distro/__init__.py"}], "after_files": [{"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nimport os\nfrom logging import getLogger\nfrom os import environ\nfrom typing import Sequence, Tuple\n\nfrom pkg_resources import iter_entry_points\n\nfrom opentelemetry import trace\nfrom opentelemetry.environment_variables import (\n    OTEL_PYTHON_ID_GENERATOR,\n    OTEL_PYTHON_SERVICE_NAME,\n    OTEL_TRACES_EXPORTER,\n)\nfrom opentelemetry.instrumentation.configurator import BaseConfigurator\nfrom opentelemetry.instrumentation.distro import BaseDistro\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor, SpanExporter\nfrom opentelemetry.sdk.trace.id_generator import IdGenerator\n\nlogger = getLogger(__file__)\n\n\nEXPORTER_OTLP = \"otlp\"\nEXPORTER_OTLP_SPAN = \"otlp_span\"\n\nRANDOM_ID_GENERATOR = \"random\"\n_DEFAULT_ID_GENERATOR = RANDOM_ID_GENERATOR\n\n\ndef _get_id_generator() -> str:\n    return environ.get(OTEL_PYTHON_ID_GENERATOR, _DEFAULT_ID_GENERATOR)\n\n\ndef _get_service_name() -> str:\n    return environ.get(OTEL_PYTHON_SERVICE_NAME, \"\")\n\n\ndef _get_exporter_names() -> Sequence[str]:\n    trace_exporters = environ.get(OTEL_TRACES_EXPORTER)\n\n    exporters = set()\n\n    if (\n        trace_exporters is not None\n        or trace_exporters.lower().strip() != \"none\"\n    ):\n        exporters.update(\n            {\n                trace_exporter.strip()\n                for trace_exporter in trace_exporters.split(\",\")\n            }\n        )\n\n    if EXPORTER_OTLP in exporters:\n        exporters.remove(EXPORTER_OTLP)\n        exporters.add(EXPORTER_OTLP_SPAN)\n\n    return list(exporters)\n\n\ndef _init_tracing(\n    exporters: Sequence[SpanExporter], id_generator: IdGenerator\n):\n    service_name = _get_service_name()\n    provider = TracerProvider(\n        resource=Resource.create({\"service.name\": service_name}),\n        id_generator=id_generator(),\n    )\n    trace.set_tracer_provider(provider)\n\n    for exporter_name, exporter_class in exporters.items():\n        exporter_args = {}\n        if exporter_name not in [\n            EXPORTER_OTLP,\n            EXPORTER_OTLP_SPAN,\n        ]:\n            exporter_args[\"service_name\"] = service_name\n\n        provider.add_span_processor(\n            BatchSpanProcessor(exporter_class(**exporter_args))\n        )\n\n\ndef _import_tracer_provider_config_components(\n    selected_components, entry_point_name\n) -> Sequence[Tuple[str, object]]:\n    component_entry_points = {\n        ep.name: ep for ep in iter_entry_points(entry_point_name)\n    }\n    component_impls = []\n    for selected_component in selected_components:\n        entry_point = component_entry_points.get(selected_component, None)\n        if not entry_point:\n            raise RuntimeError(\n                \"Requested component '{}' not found in entry points for '{}'\".format(\n                    selected_component, entry_point_name\n                )\n            )\n\n        component_impl = entry_point.load()\n        component_impls.append((selected_component, component_impl))\n\n    return component_impls\n\n\ndef _import_exporters(\n    exporter_names: Sequence[str],\n) -> Sequence[SpanExporter]:\n    trace_exporters = {}\n\n    for (\n        exporter_name,\n        exporter_impl,\n    ) in _import_tracer_provider_config_components(\n        exporter_names, \"opentelemetry_exporter\"\n    ):\n        if issubclass(exporter_impl, SpanExporter):\n            trace_exporters[exporter_name] = exporter_impl\n        else:\n            raise RuntimeError(\n                \"{0} is not a trace exporter\".format(exporter_name)\n            )\n    return trace_exporters\n\n\ndef _import_id_generator(id_generator_name: str) -> IdGenerator:\n    # pylint: disable=unbalanced-tuple-unpacking\n    [\n        (id_generator_name, id_generator_impl)\n    ] = _import_tracer_provider_config_components(\n        [id_generator_name.strip()], \"opentelemetry_id_generator\"\n    )\n\n    if issubclass(id_generator_impl, IdGenerator):\n        return id_generator_impl\n\n    raise RuntimeError(\"{0} is not an IdGenerator\".format(id_generator_name))\n\n\ndef _initialize_components():\n    exporter_names = _get_exporter_names()\n    trace_exporters = _import_exporters(exporter_names)\n    id_generator_name = _get_id_generator()\n    id_generator = _import_id_generator(id_generator_name)\n    _init_tracing(trace_exporters, id_generator)\n\n\nclass Configurator(BaseConfigurator):\n    def _configure(self, **kwargs):\n        _initialize_components()\n\n\nclass OpenTelemetryDistro(BaseDistro):\n    \"\"\"\n    The OpenTelemetry provided Distro configures a default set of\n    configuration out of the box.\n    \"\"\"\n\n    def _configure(self, **kwargs):\n        os.environ.setdefault(OTEL_TRACES_EXPORTER, \"otlp_span\")\n", "path": "opentelemetry-distro/src/opentelemetry/distro/__init__.py"}]}