Description of changes: Integrated as described here. Verified the traceId is extracted from the incoming request and then is available to be propagated to outgoing downstream requests as expected.
The various aspects of tracing happen at different points-
The application initialiser provides an option - enableTracingWithSwiftConcurrency - to enable tracing.
StandardHTTP1OperationRequestHandler: Determines if tracing is enabled, and passes an options instance to the OperationTraceContext instance being constructed indicating if a span can be created.
The OperationHandler input handlers call the operation in a scope where the ServiceContext is available via a TaskLocal. The ServiceContext is retrieved from the span provided by the current InvocationReporting instance. SmokeServerInvocationReporting retrieves this from the OperationTraceContext.
The implementation of the OperationTraceContext (by default SmokeInvocationTraceContext) ultimately determines if a span is created, creating it from the options passed to it and closing it in its handleInwardsRequestComplete function.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available:
Description of changes: Integrated as described here. Verified the traceId is extracted from the incoming request and then is available to be propagated to outgoing downstream requests as expected.
The various aspects of tracing happen at different points-
enableTracingWithSwiftConcurrency
- to enable tracing.OperationTraceContext
instance being constructed indicating if a span can be created.OperationHandler
input handlers call the operation in a scope where theServiceContext
is available via a TaskLocal. TheServiceContext
is retrieved from the span provided by the currentInvocationReporting
instance.SmokeServerInvocationReporting
retrieves this from theOperationTraceContext
.OperationTraceContext
(by defaultSmokeInvocationTraceContext
) ultimately determines if a span is created, creating it from the options passed to it and closing it in itshandleInwardsRequestComplete
function.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.