Guard API interfaces that should not be directly implemented by end-users #1574
Labels
area:propagators
Part of OpenTelemetry context propagation
area:resources
Part of OpenTelemetry resources
area:trace
Part of OpenTelemetry tracing
pkg:API
Related to an API package
pkg:SDK
Related to an SDK package
Milestone
As discussed in a recent specification SIG meeting the situation where an additional method will be added to a public API. How this translates into our implementation of the specification is that a method would need to be added to an exporter interface. This type of change is not backwards compatible, if a user implemented the original interface they would fail to compile when they upgrade because they would not implement the new interface.
This is a known limitation and there are two approaches to addressing this.
Inventory of exported interfaces
Here are the exported interfaces that are not in internal, thrid_party, or metrics packages:
"otlp/exporters/otlp/otlphttp".Option
"otlp/exporters/otlp".ProtocolDriver
"otlp/exporters/stdout".Option
"otlp/propagation".TextMapCarrier
"otlp/propagation".TextMapPropagator
"otel".ErrorHandler
"otlp/bridge/opentracing/migration".DeferredContextSetupTracerExtension
"otlp/bridge/opentracing/migration".OverrideTracerSpanExtension
"otlp/oteltest".Option
"otlp/trace".Span
"otlp/trace".Tracer
"otlp/trace".TracerProvider
"otlp/trace".TracerOption
"otlp/trace".SpanOption
"otlp/trace".EventOption
"otlp/trace".LifeCycleOption
"otlp/trace".InstrumentationOption
"otel/sdk/resource".Option
"otel/sdk/resource".Detector
"otel/sdk/export/trace".SpanExporter
"otel/sdk/trace".Sampler
"otel/sdk/trace".ParentBasedSamplerOption
"otel/sdk/trace".SpanProcessor
"otel/sdk/trace".IDGenerator
"otel/sdk/trace".ReadOnlySpan
"otel/sdk/trace".ReadWriteSpan
Tasks
Add a
private()
method and appropriate documentation, i.e.to the following interfaces:
"otlp/exporters/otlp/otlphttp".Option
"otlp/exporters/stdout".Option
"otlp/oteltest".Option
"otlp/trace".TracerOption
"otlp/trace".SpanOption
"otlp/trace".EventOption
"otlp/trace".LifeCycleOption
"otlp/trace".InstrumentationOption
"otel/sdk/resource".Option
"otel/sdk/trace".ParentBasedSamplerOption
"otel/sdk/trace".ReadOnlySpan
"otel/sdk/trace".ReadWriteSpan
The text was updated successfully, but these errors were encountered: