forked from swift-otel/swift-otel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
114 lines (104 loc) · 4.61 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
// swift-tools-version:5.9
import PackageDescription
let sharedSwiftSettings: [SwiftSetting] = [.enableExperimentalFeature("StrictConcurrency=complete")]
let package = Package(
name: "swift-otel",
platforms: [.macOS(.v13)],
products: [
.library(name: "OTel", targets: ["OTel"]),
.library(name: "OTLPGRPC", targets: ["OTLPGRPC"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-distributed-tracing.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.4.1"),
.package(url: "https://github.com/slashmo/swift-w3c-trace-context.git", exact: "1.0.0-beta.3"),
// MARK: - OTLP
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.0"),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.23.1"),
// MARK: - Plugins
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"),
],
targets: [
.target(
name: "OTel",
dependencies: [
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
.product(name: "DequeModule", package: "swift-collections"),
.product(name: "Logging", package: "swift-log"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle"),
.product(name: "Tracing", package: "swift-distributed-tracing"),
.product(name: "Atomics", package: "swift-atomics"),
.product(name: "CoreMetrics", package: "swift-metrics"),
.product(name: "W3CTraceContext", package: "swift-w3c-trace-context"),
],
swiftSettings: sharedSwiftSettings
),
.testTarget(
name: "OTelTests",
dependencies: [
.target(name: "OTel"),
.target(name: "OTelTesting"),
],
swiftSettings: sharedSwiftSettings
),
.target(
name: "OTelTesting",
dependencies: [
.product(name: "Tracing", package: "swift-distributed-tracing"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
.target(name: "OTel"),
],
swiftSettings: sharedSwiftSettings
),
// MARK: - OTLP
.target(
name: "OTLPCore",
dependencies: [
.target(name: "OTel"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
],
swiftSettings: sharedSwiftSettings
),
.testTarget(
name: "OTLPCoreTests",
dependencies: [
.target(name: "OTLPCore"),
.target(name: "OTelTesting"),
],
swiftSettings: sharedSwiftSettings
),
.target(
name: "OTLPGRPC",
dependencies: [
.target(name: "OTel"),
.target(name: "OTLPCore"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Tracing", package: "swift-distributed-tracing"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "NIOHTTP2", package: "swift-nio-http2"),
.product(name: "W3CTraceContext", package: "swift-w3c-trace-context"),
],
swiftSettings: sharedSwiftSettings
),
.testTarget(
name: "OTLPGRPCTests",
dependencies: [
.target(name: "OTLPGRPC"),
.target(name: "OTelTesting"),
.product(name: "NIOSSL", package: "swift-nio-ssl"),
],
swiftSettings: sharedSwiftSettings
),
],
swiftLanguageVersions: [.version("6"), .v5]
)