How showroomprive/opentelemetry-swift-wrapper works
Main Components
a) Core Wrapper Layer:
• Base OpenTelemetryWrapper and ContextPropagatorWrapper
• ResourceWrapper and SemanticAttributesWrapper as supporting components
b) Three Pillar Architecture (arrange these as parallel subsystems):
Traces Subsystem
• TracerProviderWrapper
• TracerWrapper
• SpanWrapper
• SpanProcessorWrapper
• Exporters (HTTP and StdOut)
Metrics Subsystem
• MeterProviderWrapper
• MeterWrapper
• MetricReaderWrapper
• Different metric types (Counter, Gauge, Histogram, UpDownCounter)
• HttpMetricExporterWrapper
Logs Subsystem
• LoggerProviderWrapper
• LoggerWrapper
• LogProcessorWrapper
• HttpLogExporterWrapper
┌─ Client Applications (KMP) ─┐
• OpenTelemetry Wrapper ────┤
• ┌────┬────┬────┐ │
• Logs│Metrics│Traces│ │
• ┴────┴────┘ │
• OpenTelemetry SDK ───────┤
• ┘
Connection and Flow Representation
• Double lines (⇒) for export paths
Detailed Component Relationships
• Provider initialization flow
• Resource and context propagation
• Telemetry data flow through processors to exporters
• Integration points with the underlying OpenTelemetry SDK
Additional Elements
Include:
• Version compatibility notes (iOS 15.0+, Swift 5.9+)
• External dependency relationships
• Configuration flow
• Error handling paths
Notes for Implementation
• Maintain consistent spacing and alignment
• Clear labels for all components
• Brief descriptions for complex interactions
• Creating separate detailed views for each pillar (traces, metrics, logs)
Create multiple views: