@@ -79,8 +79,6 @@ func NewCustomInteropServer(lsOpts *LsOpts, delegate rapidcore.InteropServer, lo
7979 }
8080
8181 go func () {
82- receivedPayload := string (bytess )
83- log .WithField ("receivedPayload" , receivedPayload ).Debugln ("hi" )
8482 err = json .Unmarshal (bytess , & invokeR )
8583 if err != nil {
8684 log .Error (err )
@@ -93,13 +91,25 @@ func NewCustomInteropServer(lsOpts *LsOpts, delegate rapidcore.InteropServer, lo
9391 invokeStart := time .Now ()
9492 err = server .Invoke (invokeResp , & interop.Invoke {
9593 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 ,
9895 Payload : strings .NewReader (invokeR .Payload ), // r.Body,
99- CorrelationID : "invokeCorrelationID" ,
10096 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{},
103113 })
104114 timeout := int (server .delegate .GetInvokeTimeout ().Seconds ())
105115 isErr := false
0 commit comments