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

RUM Before Send Handler Includes XHR Request Details #533

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

MattByers
Copy link
Contributor

This PR updates the details associated with RUM XHR events to include the original request details. These details are under a new requestDetails property and they include url (with query parameters), method, body and responseBody. Request details are only present in the paylod until the onBeforeSendRUM handler has been called, after this they're stripped from the payload, so as to not be sent to Raygun's servers. The purpose of this change is to support hydrating certain request details into XHR events, should users wish to do this. As an example, we could now swap out the url of the xhr event , to be the one from requestDetails, so that it includes query parameters in Raygun.

…atus map. Update secondary timing data extraction to include more request/response info. New function to strip request/response data from payload after the on before send handler has fired.
@MattByers MattByers requested a review from redJ4y November 25, 2024 23:41
Copy link
Contributor

@redJ4y redJ4y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@PanosNB PanosNB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No breaking changes, just a minor improvement. Good to go!

PS: I'm considering this a minor bump not patch, but do not be delayed :-)

@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>raygun4js</id>
<version>3.1.2</version>
<version>3.1.3</version>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a minor version, not a patch, but I am not being pedantic here, go as is :-)

@MattByers MattByers merged commit 541dd22 into master Nov 28, 2024
2 checks passed
@MattByers MattByers deleted the mb/request-data-for-rum-before-send-handler branch November 28, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants