-
Notifications
You must be signed in to change notification settings - Fork 748
Update docs for entrypoints #4701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
11df7e3
8613eea
daf360d
2c8f4b2
d8792e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
Entry Points | ||
============ | ||
|
||
OpenTelemetry Python uses Python's `entry points <https://setuptools.pypa.io/en/stable/userguide/entry_point.html>`_ mechanism to provide a pluggable architecture. Entry points allow you to register custom components (exporters, samplers, etc.) that can be discovered and loaded at runtime. | ||
|
||
Configuration | ||
------------- | ||
|
||
The SDK supports configuring entry points via environment variables by specifying the entry point name. For a complete list of supported environment variables, see :doc:`../api/environment_variables`. | ||
|
||
Entry Point Configuration Reference | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
**Logs Exporter** | ||
|
||
:Environment Variable: ``OTEL_LOGS_EXPORTER`` | ||
:Entry Point Group: ``opentelemetry_logs_exporter`` | ||
:Available Names: ``console``, ``otlp_proto_grpc``, ``otlp_proto_http`` | ||
:Base Type: ``LogExporter`` *(development)* | ||
|
||
**Metrics Exporter** | ||
|
||
:Environment Variable: ``OTEL_METRICS_EXPORTER`` | ||
:Entry Point Group: ``opentelemetry_metrics_exporter`` | ||
:Available Names: ``console``, ``otlp``, ``otlp_proto_grpc``, ``otlp_proto_http``, ``prometheus`` | ||
:Base Type: :class:`MetricExporter <opentelemetry.sdk.metrics.export.MetricExporter>` or :class:`MetricReader <opentelemetry.sdk.metrics.export.MetricReader>` | ||
|
||
**Propagators** | ||
|
||
:Environment Variable: ``OTEL_PROPAGATORS`` | ||
:Entry Point Group: ``opentelemetry_propagator`` | ||
:Available Names: ``b3``, ``b3multi``, ``baggage``, ``jaeger``, ``tracecontext`` | ||
:Base Type: :class:`TextMapPropagator <opentelemetry.propagators.textmap.TextMapPropagator>` | ||
|
||
**Traces Sampler** | ||
|
||
:Environment Variable: ``OTEL_TRACES_SAMPLER`` | ||
:Entry Point Group: ``opentelemetry_traces_sampler`` | ||
:Available Names: ``always_off``, ``always_on``, ``parentbased_always_off``, ``parentbased_always_on``, ``parentbased_traceidratio``, ``traceidratio`` | ||
:Base Type: :class:`Sampler <opentelemetry.sdk.trace.sampling.Sampler>` | ||
|
||
**Resource Detectors** | ||
|
||
:Environment Variable: ``OTEL_EXPERIMENTAL_RESOURCE_DETECTORS`` | ||
:Entry Point Group: ``opentelemetry_resource_detector`` | ||
:Available Names: ``host``, ``os``, ``otel``, ``process`` | ||
:Base Type: :class:`ResourceDetector <opentelemetry.sdk.resources.ResourceDetector>` | ||
|
||
**ID Generator** | ||
|
||
:Environment Variable: ``OTEL_PYTHON_ID_GENERATOR`` | ||
:Entry Point Group: ``opentelemetry_id_generator`` | ||
:Available Names: ``random`` | ||
:Base Type: :class:`IdGenerator <opentelemetry.sdk.trace.id_generator.IdGenerator>` | ||
|
||
**Traces Exporter** | ||
|
||
:Environment Variable: ``OTEL_TRACES_EXPORTER`` | ||
:Entry Point Group: ``opentelemetry_traces_exporter`` | ||
:Available Names: ``console``, ``otlp``, ``otlp_proto_grpc``, ``otlp_proto_http``, ``zipkin``, ``zipkin_json``, ``zipkin_proto`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of these names depend on an exporter package installed, we should make that clear somehow. Same applies to other groups. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 maybe we can do: Available Names There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||
:Base Type: :class:`SpanExporter <opentelemetry.sdk.trace.export.SpanExporter>` | ||
|
||
**Tracer Provider** | ||
|
||
:Environment Variable: ``OTEL_PYTHON_TRACER_PROVIDER`` | ||
:Entry Point Group: ``opentelemetry_tracer_provider`` | ||
:Available Names: ``default_tracer_provider``, ``sdk_tracer_provider`` | ||
:Base Type: :class:`TracerProvider <opentelemetry.trace.TracerProvider>` | ||
|
||
**Meter Provider** | ||
|
||
:Environment Variable: ``OTEL_PYTHON_METER_PROVIDER`` | ||
:Entry Point Group: ``opentelemetry_meter_provider`` | ||
:Available Names: ``default_meter_provider``, ``sdk_meter_provider`` | ||
:Base Type: :class:`MeterProvider <opentelemetry.metrics.MeterProvider>` | ||
|
||
**Logger Provider** | ||
|
||
:Environment Variable: ``OTEL_PYTHON_LOGGER_PROVIDER`` | ||
:Entry Point Group: ``opentelemetry_logger_provider`` | ||
:Available Names: ``sdk_logger_provider`` | ||
:Base Type: :class:`LoggerProvider <opentelemetry._logs.LoggerProvider>` | ||
|
||
**Event Logger Provider** | ||
|
||
:Environment Variable: ``OTEL_PYTHON_EVENT_LOGGER_PROVIDER`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would leave out Events stuff entirely, it's deprecated and we're trying to remove it |
||
:Entry Point Group: ``opentelemetry_event_logger_provider`` *(not implemented)* | ||
:Available Names: *None - no entry point implementations exist* | ||
:Base Type: ``EventLoggerProvider`` *(experimental)* | ||
|
||
.. note:: | ||
The Events API is `experimental <https://github.com/open-telemetry/opentelemetry-python#project-status>`_ and currently has no entry point implementations. | ||
|
||
See Also | ||
-------- | ||
|
||
* :doc:`trace` - Trace SDK documentation | ||
* :doc:`metrics` - Metrics SDK documentation | ||
* :doc:`environment_variables` - Environment variable reference |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ OpenTelemetry Python SDK | |
metrics | ||
error_handler | ||
environment_variables | ||
entry_points |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about "Entry Point Names" instead of "Available Names"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed