@@ -79,8 +79,6 @@ func NewCustomInteropServer(lsOpts *LsOpts, delegate rapidcore.InteropServer, lo
79
79
}
80
80
81
81
go func () {
82
- receivedPayload := string (bytess )
83
- log .WithField ("receivedPayload" , receivedPayload ).Debugln ("hi" )
84
82
err = json .Unmarshal (bytess , & invokeR )
85
83
if err != nil {
86
84
log .Error (err )
@@ -93,13 +91,25 @@ func NewCustomInteropServer(lsOpts *LsOpts, delegate rapidcore.InteropServer, lo
93
91
invokeStart := time .Now ()
94
92
err = server .Invoke (invokeResp , & interop.Invoke {
95
93
ID : invokeR .InvokeId ,
96
- TraceID : "TraceID" , // r.Header.Get("X-Amzn-Trace-Id"),
97
- LambdaSegmentID : "LambdaSegmentID" , // r.Header.Get("X-Amzn-Segment-Id"),
94
+ InvokedFunctionArn : invokeR .InvokedFunctionArn ,
98
95
Payload : strings .NewReader (invokeR .Payload ), // r.Body,
99
- CorrelationID : "invokeCorrelationID" ,
100
96
NeedDebugLogs : true ,
101
- InvokedFunctionArn : invokeR .InvokedFunctionArn ,
102
- //DeadlineNs:
97
+ CorrelationID : "invokeCorrelationID" ,
98
+ // TODO: should we use the env _X_AMZN_TRACE_ID here or get the value from the request headers from the direct invoke?
99
+ // for now we just set a "real" static value
100
+ TraceID : "Root=1-53cfd31b-192638fa13e39d2c2bcea001;Parent=365fb4b15f2e3987;Sampled=0" , // r.Header.Get("X-Amzn-Trace-Id"),
101
+ //TraceID: GetEnvOrDie("_X_AMZN_TRACE_ID"), // r.Header.Get("X-Amzn-Trace-Id"),
102
+ // TODO: set correct segment ID from request
103
+ //LambdaSegmentID: "LambdaSegmentID", // r.Header.Get("X-Amzn-Segment-Id"),
104
+ //CognitoIdentityID: "",
105
+ //CognitoIdentityPoolID: "",
106
+ //DeadlineNs: "",
107
+ //ClientContext: "",
108
+ //ContentType: "",
109
+ //ReservationToken: "",
110
+ //VersionID: "",
111
+ //InvokeReceivedTime: 0,
112
+ //ResyncState: interop.Resync{},
103
113
})
104
114
timeout := int (server .delegate .GetInvokeTimeout ().Seconds ())
105
115
isErr := false
0 commit comments