sjwiesman commented on pull request #303: URL: https://github.com/apache/flink-statefun/pull/303#issuecomment-1050078310
@austince I don't mean internal metadata, I mean information we want to make available to users. If we have tracing keys to see how messages are passed through the systems, functions may want access to those if they are going to call out to external apis themselves. Maybe I'm having trouble following the code but I don't understand how this works in the current implementation, because right [here](https://github.com/apache/flink-statefun/pull/303/files#diff-48c8d3a43a8c7e2bcb04e3033333fffe1cf878e94745f6b28130328bd6d151fdR172) we are overriding the original context. ```go // in the library tracingKey := "trace" traceID := "ABC" originalContext := StatfunContext(context.WithValue(ctx, tracingKey, traceId)) // fake, internally constructed initial context // in the Invoke method, user code newContext := DeriveContext(originalContext, context.WithValue(originalContext, "a", "b")) newContext.Value(tracingKey) == "ABC" newContext.Context != originalContext.Context ``` I'm also curious whose `Done` method will be respected. The one from the original HTTP request or the new context we derived from? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
