Skip to content

Commit 209bfb5

Browse files
committed
link to real deps
1 parent c2081be commit 209bfb5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Diff for: Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ let package = Package(
1717
dependencies: [
1818
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.17.0")),
1919
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.0.0")),
20-
// .package(url: "https://github.com/slashmo/gsoc-swift-baggage-context.git", .branch("main")),
21-
.package(name: "swift-context", path: "/Users/ktoso/code/gsoc-swift-baggage-context"),
20+
.package(url: "https://github.com/ktoso/gsoc-swift-baggage-context.git", .branch("ktoso:simple-is-good-proposal")), // TODO: use main once merged
21+
// .package(name: "swift-context", path: "/Users/ktoso/code/gsoc-swift-baggage-context"), // TODO: remove development dep
2222
.package(url: "https://github.com/swift-server/swift-backtrace.git", .upToNextMajor(from: "1.1.0")),
2323
],
2424
targets: [

Diff for: Sources/AWSLambdaRuntimeCore/LambdaContext.swift

+5-7
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
import BaggageContext
1516
import Dispatch
1617
import Logging
1718
import NIO
18-
import BaggageContext
1919

2020
// MARK: - InitializationContext
2121

@@ -51,7 +51,6 @@ extension Lambda {
5151
/// Lambda runtime context.
5252
/// The Lambda runtime generates and passes the `Context` to the Lambda handler as an argument.
5353
public final class Context: BaggageContext.Context, CustomDebugStringConvertible {
54-
5554
/// Contains contextual metadata such as request and trace identifiers, along with other information which may
5655
/// be carried throughout asynchronous and cross-node boundaries (e.g. through HTTPClient calls).
5756
public let baggage: Baggage
@@ -84,6 +83,7 @@ extension Lambda {
8483
public var logger: Logger {
8584
self._logger.with(self.baggage)
8685
}
86+
8787
private var _logger: Logger
8888

8989
/// The `EventLoop` the Lambda is executed on. Use this to schedule work with.
@@ -161,7 +161,6 @@ extension Lambda {
161161
// MARK: - Baggage Items
162162

163163
extension Baggage {
164-
165164
// MARK: - Baggage: RequestID
166165

167166
enum LambdaRequestIDKey: Key {
@@ -172,9 +171,9 @@ extension Baggage {
172171
/// The request ID, which identifies the request that triggered the function invocation.
173172
public internal(set) var lambdaRequestID: String {
174173
get {
175-
return self[LambdaRequestIDKey.self]! // !-safe, the runtime guarantees to always set an identifier, even in testing
174+
self[LambdaRequestIDKey.self]! // !-safe, the runtime guarantees to always set an identifier, even in testing
176175
}
177-
set {
176+
set {
178177
self[LambdaRequestIDKey.self] = newValue
179178
}
180179
}
@@ -189,11 +188,10 @@ extension Baggage {
189188
/// The AWS X-Ray tracing header.
190189
public internal(set) var lambdaTraceID: String {
191190
get {
192-
return self[LambdaTraceIDKey.self]! // !-safe, the runtime guarantees to always set an identifier, even in testing
191+
self[LambdaTraceIDKey.self]! // !-safe, the runtime guarantees to always set an identifier, even in testing
193192
}
194193
set {
195194
self[LambdaTraceIDKey.self] = newValue
196195
}
197196
}
198-
199197
}

0 commit comments

Comments
 (0)