@@ -25,7 +25,7 @@ let package = Package(
2525 . library( name: " OTelSwiftLog " , targets: [ " OTelSwiftLog " ] ) ,
2626 . library( name: " BaggagePropagationProcessor " , targets: [ " BaggagePropagationProcessor " ] ) ,
2727 . library( name: " Sessions " , targets: [ " Sessions " ] ) ,
28- . library ( name : " Crash " , targets : [ " Crash " ] ) ,
28+
2929 . executable( name: " loggingTracer " , targets: [ " LoggingTracer " ] ) ,
3030 . executable( name: " StableMetricSample " , targets: [ " StableMetricSample " ] )
3131 ] ,
@@ -36,7 +36,7 @@ let package = Package(
3636 . package ( url: " https://github.com/apple/swift-protobuf.git " , from: " 1.33.3 " ) ,
3737 . package ( url: " https://github.com/apple/swift-log.git " , from: " 1.6.4 " ) ,
3838 . package ( url: " https://github.com/apple/swift-metrics.git " , from: " 2.7.1 " ) ,
39- . package ( url : " https://github.com/kstenerud/KSCrash.git " , from : " 2.4.0 " )
39+
4040 ] ,
4141 targets: [
4242 . target(
@@ -131,16 +131,7 @@ let package = Package(
131131 path: " Sources/Instrumentation/Sessions " ,
132132 exclude: [ " README.md " ]
133133 ) ,
134- . target(
135- name: " Crash " ,
136- dependencies: [
137- . product( name: " OpenTelemetryApi " , package : " opentelemetry-swift-core " ) ,
138- . product( name: " OpenTelemetrySdk " , package : " opentelemetry-swift-core " ) ,
139- " Sessions " ,
140- . product( name: " Installations " , package : " KSCrash " ) ,
141- ] ,
142- path: " Sources/Instrumentation/Crash "
143- ) ,
134+
144135 . testTarget(
145136 name: " OTelSwiftLogTests " ,
146137 dependencies: [ " OTelSwiftLog " ] ,
@@ -193,16 +184,7 @@ let package = Package(
193184 ] ,
194185 path: " Tests/InstrumentationTests/SessionTests "
195186 ) ,
196- . testTarget(
197- name: " CrashTests " ,
198- dependencies: [
199- " Crash " ,
200- " Sessions " ,
201- " InMemoryExporter " ,
202- . product( name: " OpenTelemetrySdk " , package : " opentelemetry-swift-core " )
203- ] ,
204- path: " Tests/InstrumentationTests/CrashTests "
205- ) ,
187+
206188 . executableTarget(
207189 name: " LoggingTracer " ,
208190 dependencies: [
@@ -263,9 +245,10 @@ extension Package {
263245 #endif
264246
265247 #if canImport(Darwin)
266- dependencies. append (
267- . package ( url: " https://github.com/undefinedlabs/Thrift-Swift " , from: " 1.1.1 " )
268- )
248+ dependencies. append ( contentsOf: [
249+ . package ( url: " https://github.com/undefinedlabs/Thrift-Swift " , from: " 1.1.1 " ) ,
250+ . package ( url: " https://github.com/kstenerud/KSCrash.git " , exact: " 2.5.0 " )
251+ ] )
269252 products. append ( contentsOf: [
270253 . library( name: " JaegerExporter " , targets: [ " JaegerExporter " ] ) ,
271254 . executable( name: " simpleExporter " , targets: [ " SimpleExporter " ] ) ,
@@ -276,7 +259,8 @@ extension Package {
276259 . executable( name: " OTLPHTTPExporter " , targets: [ " OTLPHTTPExporter " ] ) ,
277260 . library( name: " SignPostIntegration " , targets: [ " SignPostIntegration " ] ) ,
278261 . library( name: " ResourceExtension " , targets: [ " ResourceExtension " ] ) ,
279- . library( name: " MetricKitInstrumentation " , targets: [ " MetricKitInstrumentation " ] )
262+ . library( name: " MetricKitInstrumentation " , targets: [ " MetricKitInstrumentation " ] ) ,
263+ . library( name: " Crash " , targets: [ " Crash " ] )
280264 ] )
281265 targets. append ( contentsOf: [
282266 . target(
@@ -428,6 +412,26 @@ extension Package {
428412 " PrometheusExporter " ] ,
429413 path: " Examples/Prometheus Sample " ,
430414 exclude: [ " README.md " ]
415+ ) ,
416+ . target(
417+ name: " Crash " ,
418+ dependencies: [
419+ . product( name: " OpenTelemetryApi " , package : " opentelemetry-swift-core " ) ,
420+ . product( name: " OpenTelemetrySdk " , package : " opentelemetry-swift-core " ) ,
421+ " Sessions " ,
422+ . product( name: " Installations " , package : " KSCrash " )
423+ ] ,
424+ path: " Sources/Instrumentation/Crash "
425+ ) ,
426+ . testTarget(
427+ name: " CrashTests " ,
428+ dependencies: [
429+ " Crash " ,
430+ " Sessions " ,
431+ " InMemoryExporter " ,
432+ . product( name: " OpenTelemetrySdk " , package : " opentelemetry-swift-core " )
433+ ] ,
434+ path: " Tests/InstrumentationTests/CrashTests "
431435 )
432436 ] )
433437 #endif
0 commit comments