Repository: open-telemetry/opentelemetry-python

Issue:
Rename `ConsoleExporter` to `ConsoleLogExporter`?
As suggested by @lonewolf3739, we should rename the ConsoleExporter to ConsoleLogExporter to follow the pattern established by the ConsoleSpanExporter.

Not in this PR; Should we rename this to `ConsoleLogExporter`?

_Originally posted by @lonewolf3739 in https://github.com/open-telemetry/opentelemetry-python/pull/2253#r759589860_


Discussion:

Resolving patch:
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py
@@ -63,7 +63,7 @@ def shutdown(self):
         """
 
 
-class ConsoleExporter(LogExporter):
+class ConsoleLogExporter(LogExporter):
     """Implementation of :class:`LogExporter` that prints log records to the
     console.
 


Test patch:
diff --git a/opentelemetry-sdk/tests/logs/test_export.py b/opentelemetry-sdk/tests/logs/test_export.py
--- a/opentelemetry-sdk/tests/logs/test_export.py
+++ b/opentelemetry-sdk/tests/logs/test_export.py
@@ -31,7 +31,7 @@
 )
 from opentelemetry.sdk._logs.export import (
     BatchLogProcessor,
-    ConsoleExporter,
+    ConsoleLogExporter,
     SimpleLogProcessor,
 )
 from opentelemetry.sdk._logs.export.in_memory_log_exporter import (
@@ -321,7 +321,7 @@ def _target():
         log_processor.shutdown()
 
 
-class TestConsoleExporter(unittest.TestCase):
+class TestConsoleLogExporter(unittest.TestCase):
     def test_export(self):  # pylint: disable=no-self-use
         """Check that the console exporter prints log records."""
         log_data = LogData(
@@ -341,7 +341,7 @@ def test_export(self):  # pylint: disable=no-self-use
                 "first_name", "first_version"
             ),
         )
-        exporter = ConsoleExporter()
+        exporter = ConsoleLogExporter()
         # Mocking stdout interferes with debugging and test reporting, mock on
         # the exporter instance instead.
 
@@ -362,7 +362,7 @@ def formatter(record):  # pylint: disable=unused-argument
             return mock_record_str
 
         mock_stdout = Mock()
-        exporter = ConsoleExporter(out=mock_stdout, formatter=formatter)
+        exporter = ConsoleLogExporter(out=mock_stdout, formatter=formatter)
         log_data = LogData(
             log_record=LogRecord(),
             instrumentation_info=InstrumentationInfo(
diff --git a/opentelemetry-sdk/tests/test_configurator.py b/opentelemetry-sdk/tests/test_configurator.py
--- a/opentelemetry-sdk/tests/test_configurator.py
+++ b/opentelemetry-sdk/tests/test_configurator.py
@@ -28,7 +28,7 @@
     _import_id_generator,
     _init_tracing,
 )
-from opentelemetry.sdk._logs.export import ConsoleExporter
+from opentelemetry.sdk._logs.export import ConsoleLogExporter
 from opentelemetry.sdk.resources import SERVICE_NAME, Resource
 from opentelemetry.sdk.trace.export import ConsoleSpanExporter
 from opentelemetry.sdk.trace.id_generator import IdGenerator, RandomIdGenerator
@@ -193,5 +193,5 @@ def test_console_exporters(self):
             trace_exporters["console"].__class__, ConsoleSpanExporter.__class__
         )
         self.assertEqual(
-            logs_exporters["console"].__class__, ConsoleExporter.__class__
+            logs_exporters["console"].__class__, ConsoleLogExporter.__class__
         )