Description
Is your feature request related to a problem? Please describe.
I have a few users that are having requests dropped that I'm trying to debug. I can see these outgoing requests as a RUM resource (that have a status code of 0 and "no response" displayed in the UI), however there is no traceId associated with it so I cannot easily find the corresponding APM traces.
Describe the solution you'd like
I'm not 100% sure, but it appears that this code will only log the traceId once some data has been received (which in this case will never happen).
Since the traceId originates with RUM, it seems like it would be possible to move the traceId to the request started block above so that even if the request receives no response there is still a traceId associated with it.
Describe alternatives you've considered
Trying to line up APM traces with RUM events using timestamps, but this has proved very difficult.