@@ -121,4 +121,51 @@ Signal builders read **signal-specific env vars** (e.g. `OTEL_EXPORTER_OTLP_TRAC
121121* Feature gating errors (compression requested w/o feature)
122122* Runtime errors are wrapped in ` OTelSdkError ` from the SDK.
123123
124- Design choice: ** builder fails fast** , runtime exporter surfaces errors through `
124+ Builder fails fast, runtime exporter surfaces errors through ` export() ` futures so processors (or Retry logic) can decide whether to back-off, drop, or escalate.
125+
126+ ---
127+
128+ ## 8. Extension & Customisation Points
129+ 1 . ** Custom headers / metadata** – ` .with_metadata(map) ` (gRPC) or ` .with_headers() ` (HTTP).
130+ 2 . ** Compression** – ` .with_compression(Compression::Gzip | Compression::Zstd) ` behind feature-flags.
131+ 3 . ** TLS** – via ` TonicConfig ` or ` HttpConfig ` ; root-store helper features embed common CA bundles.
132+ 4 . ** Alternate HTTP client** – inject any ` HttpClient ` implementation via ` .with_http_client() ` .
133+ 5 . ** Protocol JSON** – switch to JSON payloads at build-time with the ` http-json ` feature.
134+
135+ ---
136+
137+ ## 9. Interactions with Other Exporters
138+ * ** Prometheus exporter** (pull-based) bypasses OTLP entirely.
139+ * ** Jaeger / Zipkin** exporters are alternative push paths; users typically pick * one* per signal.
140+ * ** stdout exporter** may be enabled alongside OTLP in development.
141+
142+ Example mixed configuration:
143+ ``` rust
144+ let otlp = SpanExporter :: builder (). with_tonic (). build ()? ;
145+ let jaeger = opentelemetry_jaeger :: new_agent_pipeline (). install_simple ()? ;
146+ let provider = SdkTracerProvider :: builder ()
147+ . with_batch_exporter (otlp )
148+ . with_simple_exporter (jaeger )
149+ . build ();
150+ ```
151+
152+ ---
153+
154+ ## 10. Key Architectural Decisions
155+ | Decision | Rationale |
156+ | ----------| -----------|
157+ | * Builder pattern with marker types* | Compile-time guarantee that exactly one transport is chosen. |
158+ | * Transport-specific modules* | Keep heavy deps (` tonic ` , ` reqwest ` ) behind feature-flags to minimise compile times. |
159+ | * Env-vars hierarchy* | Matches OTLP spec; makes container/K8s configuration straightforward. |
160+ | * Separate crate* | Avoids pulling heavy deps into projects that don’t need OTLP. |
161+ | * Non-exhaustive error enums* | Allows adding new failure modes without breaking semver. |
162+
163+ ---
164+
165+ ### Source References
166+ * Builder traits – [ ` exporter/mod.rs ` ] ( ../../opentelemetry-otlp/src/exporter/mod.rs )
167+ * HTTP transport – [ ` exporter/http/mod.rs ` ] ( ../../opentelemetry-otlp/src/exporter/http/mod.rs )
168+ * gRPC transport – [ ` exporter/tonic/mod.rs ` ] ( ../../opentelemetry-otlp/src/exporter/tonic/mod.rs )
169+ * Span exporter – [ ` span.rs ` ] ( ../../opentelemetry-otlp/src/span.rs )
170+ * Metric exporter – [ ` metric.rs ` ] ( ../../opentelemetry-otlp/src/metric.rs )
171+ * Logs exporter – [ ` logs.rs ` ] ( ../../opentelemetry-otlp/src/logs.rs )
0 commit comments