Open slashmo opened 4 years ago
Maybe a good time to do this actually
@ktoso
Maybe a good time to do this actually
On top of that, I fail to see how existing TracingInstrument
could be used to instrument downstream HTTP APIs without "currentSpan"
in "proof of a concept" XRayMiddleware "currentSpan" equivalent is used; but its a source of problems and I'd be very happy to get rid of that; also as far as Lambda invocations are concerned the context and "currentSpan" are explicitly set at the beginning of each lambda invocation - which kind of works;
see also https://github.com/slashmo/gsoc-swift-tracing/issues/72#issuecomment-660840427 and https://github.com/slashmo/gsoc-swift-tracing/issues/48
On top of that, I fail to see how existing TracingInstrument could be used to instrument downstream HTTP APIs without "currentSpan"
"In Baggage we trust" is the motto 😉
The instrument should perform inject/extract based on baggage context;
While in a trace, and making an http request people will: http.get(url, context: trace.context)
which is the baggage context of the span; it should contain everything you'll need to perform the instrument.inject(context:into:...)
once you're (by the instrumented http client) eventually as it processes the request before it sends it out.
http.get(url, context: trace.context)
👍 thats great, it will however require changing (extending) of the HTTP client API so that user needs to pass the context (of the current span) explicitly;
still it does not solve how it to get HTTP response status as defined by XRay (arguably its not a critical feature but "nice to have") please see https://github.com/slashmo/gsoc-swift-tracing/issues/72#issuecomment-660840427 and let me know if its not clear
👍 thats great, it will however require changing (extending) of the HTTP client API so that user needs to pass the context (of the current span) explicitly;
Indeed, and that's what we'll do.
I'll look into your other question soon, I need to dig into what the core issue is.
I'll look into your other question soon, I need to dig into what the core issue is.
I tried to address the issue and made a proof of concept implementation, see https://github.com/slashmo/gsoc-swift-tracing/issues/95
https://github.com/slashmo/gsoc-swift-tracing/pull/45/files#r443569191