@@ -21,13 +21,13 @@ extension Lambda {
21
21
/// The Lambda runtime generates and passes the `Context` to the Lambda handler as an argument.
22
22
public final class Context : CustomDebugStringConvertible {
23
23
/// The request ID, which identifies the request that triggered the function invocation.
24
- public let requestId : String
24
+ public let requestID : String
25
25
26
26
/// The AWS X-Ray tracing header.
27
- public let traceId : String
27
+ public let traceID : String
28
28
29
29
/// The ARN of the Lambda function, version, or alias that's specified in the invocation.
30
- public let invokedFunctionArn : String
30
+ public let invokedFunctionARN : String
31
31
32
32
/// The timestamp that the function times out
33
33
public let deadline : DispatchWallTime
@@ -54,17 +54,17 @@ extension Lambda {
54
54
/// This is useful when implementing `EventLoopLambdaHandler`
55
55
public let allocator : ByteBufferAllocator
56
56
57
- internal init ( requestId : String ,
58
- traceId : String ,
59
- invokedFunctionArn : String ,
57
+ internal init ( requestID : String ,
58
+ traceID : String ,
59
+ invokedFunctionARN : String ,
60
60
deadline: DispatchWallTime ,
61
61
cognitoIdentity: String ? = nil ,
62
62
clientContext: String ? = nil ,
63
63
logger: Logger ,
64
64
eventLoop: EventLoop ) {
65
- self . requestId = requestId
66
- self . traceId = traceId
67
- self . invokedFunctionArn = invokedFunctionArn
65
+ self . requestID = requestID
66
+ self . traceID = traceID
67
+ self . invokedFunctionARN = invokedFunctionARN
68
68
self . cognitoIdentity = cognitoIdentity
69
69
self . clientContext = clientContext
70
70
self . deadline = deadline
@@ -73,8 +73,8 @@ extension Lambda {
73
73
self . allocator = ByteBufferAllocator ( )
74
74
// mutate logger with context
75
75
var logger = logger
76
- logger [ metadataKey: " awsRequestId " ] = . string( requestId )
77
- logger [ metadataKey: " awsTraceId " ] = . string( traceId )
76
+ logger [ metadataKey: " awsRequestID " ] = . string( requestID )
77
+ logger [ metadataKey: " awsTraceID " ] = . string( traceID )
78
78
self . logger = logger
79
79
}
80
80
@@ -87,7 +87,7 @@ extension Lambda {
87
87
}
88
88
89
89
public var debugDescription : String {
90
- " \( Self . self) (requestId : \( self . requestId ) , traceId : \( self . traceId ) , invokedFunctionArn : \( self . invokedFunctionArn ) , cognitoIdentity: \( self . cognitoIdentity ?? " nil " ) , clientContext: \( self . clientContext ?? " nil " ) , deadline: \( self . deadline) ) "
90
+ " \( Self . self) (requestID : \( self . requestID ) , traceID : \( self . traceID ) , invokedFunctionARN : \( self . invokedFunctionARN ) , cognitoIdentity: \( self . cognitoIdentity ?? " nil " ) , clientContext: \( self . clientContext ?? " nil " ) , deadline: \( self . deadline) ) "
91
91
}
92
92
}
93
93
}
0 commit comments