From 5dce6a5e58914701c6f740b6b31be0bdbd9ed10b Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sat, 4 Sep 2021 08:54:46 +0530 Subject: [PATCH 1/4] Add entry point for exporters with default protocol --- exporter/opentelemetry-exporter-jaeger/setup.cfg | 4 ++++ exporter/opentelemetry-exporter-otlp/setup.cfg | 4 ++++ exporter/opentelemetry-exporter-zipkin/setup.cfg | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/exporter/opentelemetry-exporter-jaeger/setup.cfg b/exporter/opentelemetry-exporter-jaeger/setup.cfg index 06e68fded5c..2844972609f 100644 --- a/exporter/opentelemetry-exporter-jaeger/setup.cfg +++ b/exporter/opentelemetry-exporter-jaeger/setup.cfg @@ -44,3 +44,7 @@ install_requires = [options.extras_require] test = + +[options.entry_points] +opentelemetry_exporter = + jaeger = opentelemetry.exporter.jaeger.proto.grpc:JaegerExporter diff --git a/exporter/opentelemetry-exporter-otlp/setup.cfg b/exporter/opentelemetry-exporter-otlp/setup.cfg index 8d24fca2429..0baf5a3adc0 100644 --- a/exporter/opentelemetry-exporter-otlp/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp/setup.cfg @@ -39,3 +39,7 @@ python_requires = >=3.6 packages=find_namespace: install_requires = opentelemetry-exporter-otlp-proto-grpc == 1.5.0 + +[options.entry_points] +opentelemetry_exporter = + otlp = opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter diff --git a/exporter/opentelemetry-exporter-zipkin/setup.cfg b/exporter/opentelemetry-exporter-zipkin/setup.cfg index bea3c1043d1..6296b1e2ef4 100644 --- a/exporter/opentelemetry-exporter-zipkin/setup.cfg +++ b/exporter/opentelemetry-exporter-zipkin/setup.cfg @@ -43,3 +43,7 @@ install_requires = [options.extras_require] test = + +[options.entry_points] +opentelemetry_exporter = + zipkin = opentelemetry.exporter.zipkin.proto.http:ZipkinExporter From 8c1a036ef58830093a6663d25a60615e14d1d797 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sat, 4 Sep 2021 11:13:23 +0530 Subject: [PATCH 2/4] Add CHANGELOG entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bee8bd3cca..28296704a34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2077](https://github.com/open-telemetry/opentelemetry-python/pull/2077)) - Fix propagation bug caused by counting skipped entries ([#2071](https://github.com/open-telemetry/opentelemetry-python/pull/2071)) +- Add entry point for exporters with default protocol + ([#2093](https://github.com/open-telemetry/opentelemetry-python/pull/2093)) ## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0-0.24b0) - 2021-08-26 From 4ea773c58b9df0fbf1eab221d7450982fa3571a3 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 17 Sep 2021 22:50:01 +0530 Subject: [PATCH 3/4] Change exporter entrypoint names to signal specific --- exporter/opentelemetry-exporter-jaeger-proto-grpc/setup.cfg | 2 +- exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg | 4 ++-- exporter/opentelemetry-exporter-jaeger/setup.cfg | 2 +- exporter/opentelemetry-exporter-opencensus/setup.cfg | 4 ++-- exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg | 2 +- exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg | 2 +- exporter/opentelemetry-exporter-otlp/setup.cfg | 2 +- exporter/opentelemetry-exporter-zipkin-json/setup.cfg | 4 ++-- exporter/opentelemetry-exporter-zipkin-proto-http/setup.cfg | 4 ++-- exporter/opentelemetry-exporter-zipkin/setup.cfg | 2 +- opentelemetry-sdk/setup.cfg | 2 +- .../src/opentelemetry/sdk/_configuration/__init__.py | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/exporter/opentelemetry-exporter-jaeger-proto-grpc/setup.cfg b/exporter/opentelemetry-exporter-jaeger-proto-grpc/setup.cfg index bd792429899..4f4228f9c76 100644 --- a/exporter/opentelemetry-exporter-jaeger-proto-grpc/setup.cfg +++ b/exporter/opentelemetry-exporter-jaeger-proto-grpc/setup.cfg @@ -52,5 +52,5 @@ where = src test = [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = jaeger_proto = opentelemetry.exporter.jaeger.proto.grpc:JaegerExporter diff --git a/exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg b/exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg index 945150d6879..e2c98a48096 100644 --- a/exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg +++ b/exporter/opentelemetry-exporter-jaeger-thrift/setup.cfg @@ -51,5 +51,5 @@ where = src test = [options.entry_points] -opentelemetry_exporter = - jaeger_thrift = opentelemetry.exporter.jaeger.thrift:JaegerExporter \ No newline at end of file +opentelemetry_traces_exporter = + jaeger_thrift = opentelemetry.exporter.jaeger.thrift:JaegerExporter diff --git a/exporter/opentelemetry-exporter-jaeger/setup.cfg b/exporter/opentelemetry-exporter-jaeger/setup.cfg index 2844972609f..e882a65f975 100644 --- a/exporter/opentelemetry-exporter-jaeger/setup.cfg +++ b/exporter/opentelemetry-exporter-jaeger/setup.cfg @@ -46,5 +46,5 @@ install_requires = test = [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = jaeger = opentelemetry.exporter.jaeger.proto.grpc:JaegerExporter diff --git a/exporter/opentelemetry-exporter-opencensus/setup.cfg b/exporter/opentelemetry-exporter-opencensus/setup.cfg index 03e82b70f37..1e10bc7b968 100644 --- a/exporter/opentelemetry-exporter-opencensus/setup.cfg +++ b/exporter/opentelemetry-exporter-opencensus/setup.cfg @@ -53,5 +53,5 @@ where = src test = [options.entry_points] -opentelemetry_exporter = - opencensus = opentelemetry.exporter.opencensus.trace_exporter:OpenCensusSpanExporter \ No newline at end of file +opentelemetry_traces_exporter = + opencensus = opentelemetry.exporter.opencensus.trace_exporter:OpenCensusSpanExporter diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg b/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg index 7013425c958..16aab328dfd 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg @@ -54,5 +54,5 @@ test = where = src [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = otlp_proto_grpc_span = opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg b/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg index 5f6d102d120..8e5810d34db 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg @@ -53,5 +53,5 @@ test = where = src [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = otlp_proto_http_span = opentelemetry.exporter.otlp.proto.http.trace_exporter:OTLPSpanExporter diff --git a/exporter/opentelemetry-exporter-otlp/setup.cfg b/exporter/opentelemetry-exporter-otlp/setup.cfg index 0baf5a3adc0..b971015497d 100644 --- a/exporter/opentelemetry-exporter-otlp/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp/setup.cfg @@ -41,5 +41,5 @@ install_requires = opentelemetry-exporter-otlp-proto-grpc == 1.5.0 [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = otlp = opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter diff --git a/exporter/opentelemetry-exporter-zipkin-json/setup.cfg b/exporter/opentelemetry-exporter-zipkin-json/setup.cfg index 81fcbfa261c..2517b523261 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/setup.cfg +++ b/exporter/opentelemetry-exporter-zipkin-json/setup.cfg @@ -52,5 +52,5 @@ where = src test = [options.entry_points] -opentelemetry_exporter = - zipkin_json = opentelemetry.exporter.zipkin.json:ZipkinExporter \ No newline at end of file +opentelemetry_traces_exporter = + zipkin_json = opentelemetry.exporter.zipkin.json:ZipkinExporter diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/setup.cfg b/exporter/opentelemetry-exporter-zipkin-proto-http/setup.cfg index 874ce5a368e..a6cdd5b5f87 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/setup.cfg +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/setup.cfg @@ -54,5 +54,5 @@ where = src test = [options.entry_points] -opentelemetry_exporter = - zipkin_proto = opentelemetry.exporter.zipkin.proto.http:ZipkinExporter \ No newline at end of file +opentelemetry_traces_exporter = + zipkin_proto = opentelemetry.exporter.zipkin.proto.http:ZipkinExporter diff --git a/exporter/opentelemetry-exporter-zipkin/setup.cfg b/exporter/opentelemetry-exporter-zipkin/setup.cfg index 6296b1e2ef4..70e850bfe79 100644 --- a/exporter/opentelemetry-exporter-zipkin/setup.cfg +++ b/exporter/opentelemetry-exporter-zipkin/setup.cfg @@ -45,5 +45,5 @@ install_requires = test = [options.entry_points] -opentelemetry_exporter = +opentelemetry_traces_exporter = zipkin = opentelemetry.exporter.zipkin.proto.http:ZipkinExporter diff --git a/opentelemetry-sdk/setup.cfg b/opentelemetry-sdk/setup.cfg index 160fde86e51..36ccbc2a06e 100644 --- a/opentelemetry-sdk/setup.cfg +++ b/opentelemetry-sdk/setup.cfg @@ -52,7 +52,7 @@ where = src [options.entry_points] opentelemetry_tracer_provider = sdk_tracer_provider = opentelemetry.sdk.trace:TracerProvider -opentelemetry_exporter = +opentelemetry_traces_exporter = console_span = opentelemetry.sdk.trace.export:ConsoleSpanExporter opentelemetry_id_generator = random = opentelemetry.sdk.trace.id_generator:RandomIdGenerator diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py index 65bb92eb7ab..4a76f405526 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -111,7 +111,7 @@ def _import_exporters( exporter_name, exporter_impl, ) in _import_tracer_provider_config_components( - exporter_names, "opentelemetry_exporter" + exporter_names, "opentelemetry_traces_exporter" ): if issubclass(exporter_impl, SpanExporter): trace_exporters[exporter_name] = exporter_impl From aea0b644b945cc5f0a79cf4e9d24a0102a0063bb Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Tue, 21 Sep 2021 06:13:15 +0530 Subject: [PATCH 4/4] Remove redundant keyword from entrypoint name --- exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg | 2 +- exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg | 2 +- opentelemetry-sdk/setup.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg b/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg index 16aab328dfd..5d144190d35 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/setup.cfg @@ -55,4 +55,4 @@ where = src [options.entry_points] opentelemetry_traces_exporter = - otlp_proto_grpc_span = opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter + otlp_proto_grpc = opentelemetry.exporter.otlp.proto.grpc.trace_exporter:OTLPSpanExporter diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg b/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg index 8e5810d34db..38b82f42656 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg +++ b/exporter/opentelemetry-exporter-otlp-proto-http/setup.cfg @@ -54,4 +54,4 @@ where = src [options.entry_points] opentelemetry_traces_exporter = - otlp_proto_http_span = opentelemetry.exporter.otlp.proto.http.trace_exporter:OTLPSpanExporter + otlp_proto_http = opentelemetry.exporter.otlp.proto.http.trace_exporter:OTLPSpanExporter diff --git a/opentelemetry-sdk/setup.cfg b/opentelemetry-sdk/setup.cfg index 36ccbc2a06e..0c699262c64 100644 --- a/opentelemetry-sdk/setup.cfg +++ b/opentelemetry-sdk/setup.cfg @@ -53,7 +53,7 @@ where = src opentelemetry_tracer_provider = sdk_tracer_provider = opentelemetry.sdk.trace:TracerProvider opentelemetry_traces_exporter = - console_span = opentelemetry.sdk.trace.export:ConsoleSpanExporter + console = opentelemetry.sdk.trace.export:ConsoleSpanExporter opentelemetry_id_generator = random = opentelemetry.sdk.trace.id_generator:RandomIdGenerator