Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕 Log traceId at start of request #2641

Open
mantljosh opened this issue Mar 11, 2024 · 1 comment
Open

馃挕 Log traceId at start of request #2641

mantljosh opened this issue Mar 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mantljosh
Copy link

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.

@mantljosh mantljosh added the enhancement New feature or request label Mar 11, 2024
@BenoitZugmeyer
Copy link
Member

BenoitZugmeyer commented Mar 12, 2024

Hello @mantljosh, thank you for your feedback.

Requests with a status code 0 indicates that no HTTP response occured. Typical causes include connectivity issues or the request being blocked by the browser (ex: CORS) or an extension. As this kind of request are probably not reaching the server, we don't include the trace id in the resource. This is by design (see code).

Now, this assumption is not always true, and you might still be interested to see backend traces without a span generated from the browser. One way to narrow things down is to filter Trace Root Spans that don't match a browser request (-operation_name:browser.request):

Screenshot 2024-03-12 at 16 21 58

Let us know if it helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants