forked from open-telemetry/opentelemetry-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
176 lines (174 loc) · 10.1 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "opentelemetry-swift",
platforms: [.macOS(.v10_13),
.iOS(.v11),
.tvOS(.v11),
.watchOS(.v3)],
products: [
.library(name: "OpenTelemetryApi", type: .static, targets: ["OpenTelemetryApi"]),
.library(name: "OpenTelemetrySdk", type: .static, targets: ["OpenTelemetrySdk"]),
.library(name: "ResourceExtension", type: .static, targets: ["ResourceExtension"]),
.library(name: "URLSessionInstrumentation", type: .static, targets: ["URLSessionInstrumentation"]),
.library(name: "SignPostIntegration", type: .static, targets: ["SignPostIntegration"]),
.library(name: "OpenTracingShim-experimental", type: .static, targets: ["OpenTracingShim"]),
.library(name: "SwiftMetricsShim", type: .static, targets: ["SwiftMetricsShim"]),
.library(name: "JaegerExporter", type: .static, targets: ["JaegerExporter"]),
.library(name: "ZipkinExporter", type: .static, targets: ["ZipkinExporter"]),
.library(name: "StdoutExporter", type: .static, targets: ["StdoutExporter"]),
.library(name: "PrometheusExporter", type: .static, targets: ["PrometheusExporter"]),
.library(name: "OpenTelemetryProtocolExporter", type: .static, targets: ["OpenTelemetryProtocolExporter"]),
.library(name: "PersistenceExporter", type: .static, targets: ["PersistenceExporter"]),
.library(name: "InMemoryExporter", type: .static, targets: ["InMemoryExporter"]),
.library(name: "DatadogExporter", type: .static, targets: ["DatadogExporter"]),
.library(name: "NetworkStatus", type: .static, targets: ["NetworkStatus"]),
.executable(name: "simpleExporter", targets: ["SimpleExporter"]),
.executable(name: "OTLPExporter", targets: ["OTLPExporter"]),
.executable(name: "loggingTracer", targets: ["LoggingTracer"]),
],
dependencies: [
.package(name: "Opentracing", url: "https://github.com/cswelin/opentracing-objc", from: "0.5.3"),
.package(name: "Thrift", url: "https://github.com/cswelin/Thrift-Swift", .branch("master")),
.package(name: "swift-nio", url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
.package(name: "grpc-swift", url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0"),
.package(name: "swift-atomics", url: "https://github.com/apple/swift-atomics.git", "0.0.2"..."2.0.0"),
.package(name: "swift-metrics", url: "https://github.com/apple/swift-metrics.git", from: "2.1.1"),
],
targets: [
.target(name: "OpenTelemetryApi",
dependencies: []),
.target(name: "OpenTelemetrySdk",
dependencies: ["OpenTelemetryApi",
.product(name: "Atomics", package: "swift-atomics")]),
.target(name: "ResourceExtension",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Instrumentation/SDKResourceExtension",
exclude: ["README.md"]),
.target(name: "URLSessionInstrumentation",
dependencies: ["OpenTelemetrySdk", "NetworkStatus"],
path: "Sources/Instrumentation/URLSession",
exclude: ["README.md"]),
.target(name: "NetworkStatus",
dependencies: ["OpenTelemetryApi"],
path: "Sources/Instrumentation/NetworkStatus",
linkerSettings: [.linkedFramework("CoreTelephony", .when(platforms: [.iOS], configuration: nil))]),
.target(name: "SignPostIntegration",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Instrumentation/SignPostIntegration",
exclude: ["README.md"]),
.target(name: "OpenTracingShim",
dependencies: ["OpenTelemetrySdk",
"Opentracing"],
path: "Sources/Importers/OpenTracingShim",
exclude: ["README.md"]),
.target(name: "SwiftMetricsShim",
dependencies: ["OpenTelemetrySdk",
.product(name: "NIO", package: "swift-nio"),
.product(name: "CoreMetrics", package: "swift-metrics")],
path: "Sources/Importers/SwiftMetricsShim",
exclude: ["README.md"]),
.target(name: "JaegerExporter",
dependencies: ["OpenTelemetrySdk",
.product(name: "Thrift", package: "Thrift")],
path: "Sources/Exporters/Jaeger"),
.target(name: "ZipkinExporter",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Exporters/Zipkin"),
.target(name: "PrometheusExporter",
dependencies: ["OpenTelemetrySdk",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio")],
path: "Sources/Exporters/Prometheus"),
.target(name: "OpenTelemetryProtocolExporter",
dependencies: ["OpenTelemetrySdk",
.product(name: "GRPC", package: "grpc-swift")],
path: "Sources/Exporters/OpenTelemetryProtocol"),
.target(name: "StdoutExporter",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Exporters/Stdout"),
.target(name: "InMemoryExporter",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Exporters/InMemory"),
.target(name: "DatadogExporter",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Exporters/DatadogExporter",
exclude: ["NOTICE", "README.md"]),
.target(name: "PersistenceExporter",
dependencies: ["OpenTelemetrySdk"],
path: "Sources/Exporters/Persistence"),
.testTarget(name: "NetworkStatusTests",
dependencies: ["NetworkStatus"],
path: "Tests/InstrumentationTests/NetworkStatusTests"),
.testTarget(name: "OpenTelemetryApiTests",
dependencies: ["OpenTelemetryApi"],
path: "Tests/OpenTelemetryApiTests"),
.testTarget(name: "OpenTelemetrySdkTests",
dependencies: ["OpenTelemetryApi",
"OpenTelemetrySdk"],
path: "Tests/OpenTelemetrySdkTests"),
.testTarget(name: "ResourceExtensionTests",
dependencies: ["ResourceExtension", "OpenTelemetrySdk"],
path: "Tests/InstrumentationTests/SDKResourceExtensionTests"),
.testTarget(name: "URLSessionInstrumentationTests",
dependencies: ["URLSessionInstrumentation",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio")],
path: "Tests/InstrumentationTests/URLSessionTests"),
.testTarget(name: "OpenTracingShimTests",
dependencies: ["OpenTracingShim",
"OpenTelemetrySdk"],
path: "Tests/ImportersTests/OpenTracingShim"),
.testTarget(name: "SwiftMetricsShimTests",
dependencies: ["SwiftMetricsShim",
"OpenTelemetrySdk"],
path: "Tests/ImportersTests/SwiftMetricsShim"),
.testTarget(name: "JaegerExporterTests",
dependencies: ["JaegerExporter"],
path: "Tests/ExportersTests/Jaeger"),
.testTarget(name: "ZipkinExporterTests",
dependencies: ["ZipkinExporter"],
path: "Tests/ExportersTests/Zipkin"),
.testTarget(name: "PrometheusExporterTests",
dependencies: ["PrometheusExporter"],
path: "Tests/ExportersTests/Prometheus"),
.testTarget(name: "OpenTelemetryProtocolExporterTests",
dependencies: ["OpenTelemetryProtocolExporter"],
path: "Tests/ExportersTests/OpenTelemetryProtocol"),
.testTarget(name: "InMemoryExporterTests",
dependencies: ["InMemoryExporter"],
path: "Tests/ExportersTests/InMemory"),
.testTarget(name: "DatadogExporterTests",
dependencies: ["DatadogExporter",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio")],
path: "Tests/ExportersTests/DatadogExporter"),
.testTarget(name: "PersistenceExporterTests",
dependencies: ["PersistenceExporter"],
path: "Tests/ExportersTests/PersistenceExporter"),
.target(name: "LoggingTracer",
dependencies: ["OpenTelemetryApi"],
path: "Examples/Logging Tracer"),
.target(name: "SimpleExporter",
dependencies: ["OpenTelemetrySdk", "JaegerExporter", "StdoutExporter", "ZipkinExporter", "ResourceExtension", "SignPostIntegration"],
path: "Examples/Simple Exporter",
exclude: ["README.md"]),
.target(name: "OTLPExporter",
dependencies: ["OpenTelemetrySdk", "OpenTelemetryProtocolExporter", "StdoutExporter", "ZipkinExporter", "ResourceExtension", "SignPostIntegration"],
path: "Examples/OTLP Exporter",
exclude: ["README.md"]),
.target(name: "PrometheusSample",
dependencies: ["OpenTelemetrySdk", "PrometheusExporter"],
path: "Examples/Prometheus Sample",
exclude: ["README.md"]),
.target(name: "DatadogSample",
dependencies: ["DatadogExporter"],
path: "Examples/Datadog Sample",
exclude: ["README.md"]),
.target(name: "NetworkSample",
dependencies: ["URLSessionInstrumentation", "StdoutExporter"],
path: "Examples/Network Sample",
exclude: ["README.md"]),
]
)