@@ -22,7 +22,8 @@ let package = Package(
2222 . library( name: " ZipkinExporter " , type: . static, targets: [ " ZipkinExporter " ] ) ,
2323 . library( name: " StdoutExporter " , type: . static, targets: [ " StdoutExporter " ] ) ,
2424 . library( name: " PrometheusExporter " , type: . static, targets: [ " PrometheusExporter " ] ) ,
25- . library( name: " OpenTelemetryProtocolExporter " , type: . static, targets: [ " OpenTelemetryProtocolExporter " ] ) ,
25+ . library( name: " OpenTelemetryProtocolExporter " , type: . static, targets: [ " OpenTelemetryProtocolExporterGrpc " ] ) ,
26+ . library( name: " OpenTelemetryProtocolExporterHTTP " , type: . static, targets: [ " OpenTelemetryProtocolExporterHttp " ] ) ,
2627 . library( name: " PersistenceExporter " , type: . static, targets: [ " PersistenceExporter " ] ) ,
2728 . library( name: " InMemoryExporter " , type: . static, targets: [ " InMemoryExporter " ] ) ,
2829 . library( name: " DatadogExporter " , type: . static, targets: [ " DatadogExporter " ] ) ,
@@ -37,6 +38,8 @@ let package = Package(
3738 . package ( name: " Thrift " , url: " https://github.com/undefinedlabs/Thrift-Swift " , from: " 1.1.1 " ) ,
3839 . package ( name: " swift-nio " , url: " https://github.com/apple/swift-nio.git " , from: " 2.0.0 " ) ,
3940 . package ( name: " grpc-swift " , url: " https://github.com/grpc/grpc-swift.git " , from: " 1.0.0 " ) ,
41+ . package ( name: " swift-protobuf " , url: " https://github.com/apple/swift-protobuf.git " , from: " 1.20.2 " ) ,
42+ . package ( name: " swift-log " , url: " https://github.com/apple/swift-log.git " , from: " 1.4.4 " ) ,
4043 . package ( name: " swift-metrics " , url: " https://github.com/apple/swift-metrics.git " , from: " 2.1.1 " ) ,
4144 . package ( name: " Reachability.swift " , url: " https://github.com/ashleymills/Reachability.swift " , from: " 5.1.0 " )
4245 ] ,
@@ -86,10 +89,20 @@ let package = Package(
8689 . product( name: " NIO " , package : " swift-nio " ) ,
8790 . product( name: " NIOHTTP1 " , package : " swift-nio " ) ] ,
8891 path: " Sources/Exporters/Prometheus " ) ,
89- . target( name: " OpenTelemetryProtocolExporter " ,
92+ . target( name: " OpenTelemetryProtocolExporterCommon " ,
9093 dependencies: [ " OpenTelemetrySdk " ,
94+ . product( name: " Logging " , package : " swift-log " ) ,
95+ . product( name: " SwiftProtobuf " , package : " swift-protobuf " ) ] ,
96+ path: " Sources/Exporters/OpenTelemetryProtocolCommon " ) ,
97+ . target( name: " OpenTelemetryProtocolExporterHttp " ,
98+ dependencies: [ " OpenTelemetrySdk " ,
99+ " OpenTelemetryProtocolExporterCommon " ] ,
100+ path: " Sources/Exporters/OpenTelemetryProtocolHttp " ) ,
101+ . target( name: " OpenTelemetryProtocolExporterGrpc " ,
102+ dependencies: [ " OpenTelemetrySdk " ,
103+ " OpenTelemetryProtocolExporterCommon " ,
91104 . product( name: " GRPC " , package : " grpc-swift " ) ] ,
92- path: " Sources/Exporters/OpenTelemetryProtocol " ) ,
105+ path: " Sources/Exporters/OpenTelemetryProtocolGrpc " ) ,
93106 . target( name: " StdoutExporter " ,
94107 dependencies: [ " OpenTelemetrySdk " ] ,
95108 path: " Sources/Exporters/Stdout " ) ,
@@ -139,10 +152,11 @@ let package = Package(
139152 dependencies: [ " PrometheusExporter " ] ,
140153 path: " Tests/ExportersTests/Prometheus " ) ,
141154 . testTarget( name: " OpenTelemetryProtocolExporterTests " ,
142- dependencies: [ " OpenTelemetryProtocolExporter " ,
143- . product( name: " NIO " , package : " swift-nio " ) ,
144- . product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
145- . product( name: " NIOTestUtils " , package : " swift-nio " ) ] ,
155+ dependencies: [ " OpenTelemetryProtocolExporterGrpc " ,
156+ " OpenTelemetryProtocolExporterHttp " ,
157+ . product( name: " NIO " , package : " swift-nio " ) ,
158+ . product( name: " NIOHTTP1 " , package : " swift-nio " ) ,
159+ . product( name: " NIOTestUtils " , package : " swift-nio " ) ] ,
146160 path: " Tests/ExportersTests/OpenTelemetryProtocol " ) ,
147161 . testTarget( name: " InMemoryExporterTests " ,
148162 dependencies: [ " InMemoryExporter " ] ,
@@ -163,11 +177,11 @@ let package = Package(
163177 path: " Examples/Simple Exporter " ,
164178 exclude: [ " README.md " ] ) ,
165179 . target( name: " OTLPExporter " ,
166- dependencies: [ " OpenTelemetrySdk " , " OpenTelemetryProtocolExporter " , " StdoutExporter " , " ZipkinExporter " , " ResourceExtension " , " SignPostIntegration " ] ,
180+ dependencies: [ " OpenTelemetrySdk " , " OpenTelemetryProtocolExporterGrpc " , " StdoutExporter " , " ZipkinExporter " , " ResourceExtension " , " SignPostIntegration " ] ,
167181 path: " Examples/OTLP Exporter " ,
168182 exclude: [ " README.md " ] ) ,
169183 . target( name: " OTLPHTTPExporter " ,
170- dependencies: [ " OpenTelemetrySdk " , " OpenTelemetryProtocolExporter " , " StdoutExporter " , " ZipkinExporter " , " ResourceExtension " , " SignPostIntegration " ] ,
184+ dependencies: [ " OpenTelemetrySdk " , " OpenTelemetryProtocolExporterHttp " , " StdoutExporter " , " ZipkinExporter " , " ResourceExtension " , " SignPostIntegration " ] ,
171185 path: " Examples/OTLP HTTP Exporter " ,
172186 exclude: [ " README.md " ] ) ,
173187 . target( name: " PrometheusSample " ,
0 commit comments