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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protocol metadata to resource fetch requests #12395

Closed
serglom21 opened this issue Jun 6, 2024 · 4 comments · Fixed by #15161
Closed

Add protocol metadata to resource fetch requests #12395

serglom21 opened this issue Jun 6, 2024 · 4 comments · Fixed by #15161
Assignees
Labels
Meta: Good First Issue Migrated Package: browser Issues related to the Sentry Browser SDK

Comments

@serglom21
Copy link

Problem Statement

Currently, information like network.protocol.name and network.protocol.version is added to http.client operations. It would be beneficial to also see this information on resource fetch requests

Solution Brainstorm

Add network.protocol.name and network.protocol.version to resource fetch requests

@Lms24
Copy link
Member

Lms24 commented Jun 7, 2024

Hey @serglom21 thanks for writing in!

It would be beneficial to also see this information on resource fetch requests

To confirm, do you mean the browser resource.(script|img|other) spans?
image

I'm not sure this is possible given that the instrumentation for fetch and XHR requests (http.client spans) is different from how we create the resource spans. Gonna tag @k-fish since I believe you worked on adding the http timing data. Any idea if we can obtain this data for resource spans?

Which SDK are you using?

@getsantry getsantry bot removed the status in GitHub Issues with 👀 3 Jun 7, 2024
@Lms24 Lms24 added the Package: browser Issues related to the Sentry Browser SDK label Jun 7, 2024
@AbhiPrasad
Copy link
Member

Yes we can add this because it comes from the resource timing api:

const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);

@serglom21
Copy link
Author

@Lms24 Correct! I mean all of the resource.(script|img|other) spans

This was tested on [email protected]

@k-fish
Copy link
Member

k-fish commented Jun 10, 2024

Ditto what @AbhiPrasad said, it's definitely possible to get that out since it's part of resource timing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta: Good First Issue Migrated Package: browser Issues related to the Sentry Browser SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants