We were previously extracting trace context from the OriginalEvent. This means we will not be able to extract the trace information when consuming events from a category stream. This PR extracts the trace information from the Event itself. This applies to both regular and persistent subscriptions.
Also improved test testTracingContextInjectionIsIgnoredAsExpectedWhenUserMetadataIsNonNullAndNotAJsonObject to ensure no span is created in subscription for events with non-json metadata.
Changed: Extract tracing metadata from Event
We were previously extracting trace context from the OriginalEvent. This means we will not be able to extract the trace information when consuming events from a category stream. This PR extracts the trace information from the Event itself. This applies to both regular and persistent subscriptions.
Also improved test
testTracingContextInjectionIsIgnoredAsExpectedWhenUserMetadataIsNonNullAndNotAJsonObject
to ensure no span is created in subscription for events with non-json metadata.