Skip to content

Commit

Permalink
Custom timings showing on pages that arent-related (#500)
Browse files Browse the repository at this point in the history
* Update raygun.js

* Update raygun.js

* Create 128x128-transparent.png

* Update raygun4js.nuspec

* Update tests.yml

* bump
  • Loading branch information
darcythomas committed Aug 30, 2023
1 parent f803f29 commit 65a6098
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: 20.x
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: latest
chrome-version: stable
- run: npm ci
- run: npx grunt
- run: npm test
Binary file added 128x128-transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raygun4js",
"version": "2.27.0",
"version": "2.27.1",
"homepage": "http://raygun.com",
"authors": [
"Mindscape <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"title": "Raygun4js",
"description": "Raygun.com plugin for JavaScript",
"version": "2.27.0",
"version": "2.27.1",
"homepage": "https://github.com/MindscapeHQ/raygun4js",
"author": {
"name": "MindscapeHQ",
Expand Down
6 changes: 4 additions & 2 deletions raygun4js.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>raygun4js</id>
<version>2.27.0</version>
<version>2.27.1</version>
<title>Raygun4js</title>
<authors>Raygun Limited</authors>
<owners>Raygun Limited</owners>
<licenseUrl>https://raw2.github.com/MindscapeHQ/raygun4js/master/LICENSE</licenseUrl>
<PackageIcon>128x128-transparent.png</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/MindscapeHQ/raygun4js</RepositoryUrl>
<projectUrl>http://raygun.com/raygun-providers/javascript</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Official Raygun JavaScript module - automatic client-side error tracking and Real User Monitoring for your web project</summary>
Expand Down
9 changes: 5 additions & 4 deletions src/raygun.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,15 @@ var raygunFactory = function (window, $, undefined) {
}
},

trackEvent: function (type, options) {
trackEvent: function (type, options, parentResource) {
if (_providerState !== ProviderStates.READY) {
_trackEventQueue.push({ type: type, options: options });
parentResource = _rum.parentResource;
_trackEventQueue.push({ type: type, options: options, parentResource: parentResource });
return;
}

if (Raygun.RealUserMonitoring !== undefined && _rum) {
var parentResource = _rum.parentResource;
parentResource = parentResource || _rum.parentResource;
if (type === 'pageView' && options.path) {
_rum.virtualPageLoaded(options.path);
} else if (type === 'customTiming') {
Expand Down Expand Up @@ -556,7 +557,7 @@ var raygunFactory = function (window, $, undefined) {
_processExceptionQueue = [];

for (i = 0; i < _trackEventQueue.length; i++) {
_publicRaygunFunctions.trackEvent(_trackEventQueue[i].type, _trackEventQueue[i].options);
_publicRaygunFunctions.trackEvent(_trackEventQueue[i].type, _trackEventQueue[i].options , _trackEventQueue[i].parentResource || null);
}

_trackEventQueue = [];
Expand Down

0 comments on commit 65a6098

Please sign in to comment.