Skip to content

Conversation

@fizerkhan
Copy link
Contributor

@fizerkhan fizerkhan commented Nov 14, 2022

What does this PR do?

Added options to hashRoutes, version, disableRUM, disableSession, disableSPA, disableAjaxMonitoring, disableErrorTracking, disableTransaction, whitelistUrls, ignoreUrls, ignoreErrors and reportUnhandledRejections.

Are there breaking changes in this PR?

We have removed allowedDomains and renamed the option to whitelistUrls.

Testing

Testing completed successfully. local env and the options flag works as expected.

Any background context you want to provide?

We have added a few options which have been asked by our customers.

Is there parity with the server-side/android/iOS integration components (if applicable)?

No

Does this require a new integration setting? If so, please explain how the new setting works

Yes,

hashRoutes - Atatus removes the hash from the URL and if you're using hash based routes you can set this option to true. It is of type boolean and defaults to false.

version - Helps you in filtering the errors from the dashboard using the version. It is of type string " ".

disableRUM - You can disable RUM metrics by setting this option to true. It is of type boolean and defaults to false.

disableSession - You can set this option to true if you want to disable reporting of session traces. It is of type boolean and defaults to false.

disableSPA - Set this option to true to disable SPA monitoring. It is of type boolean and defaults to false.

disableAjaxMonitoring - Disable AJAX monitoring by setting this option to true. It is of type boolean and defaults to false.

disableErrorTracking - Set disableErrorTracking to true to disable error tracking. It is of type boolean and defaults to false.

disableTransaction - You can disable the collection of transactions by setting the option to true. It is of type boolean and defaults to false.

whitelistUrls - Captures the page views, AJAX and JS Errors from the given domains or URLs and ignores insights from all other URLs. It is of type array [].

ignoreUrls - Ignore capturing insights from a given set of domains or URLs. It is of type array [].

ignoreErrors - It is an array of unwanted error messages to be filtered out before being sent to Atatus as either array of regular expressions or strings. Type array [].

reportUnhandledRejections - This will allow disabling or enabling the unhandled promise rejection errors. By default, it is set to true. It is of type boolean and defaults to true.

Links to helpful docs and other external resources

With the help of the documentation below, you can easily set up the options.

https://docs.atatus.com/docs/browser-monitoring/customize-agent.html

Copy link
Contributor

@arielsilvestri arielsilvestri left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment.

Comment on lines 71 to 77
// Set allowed domains and enable offline
if (
Array.isArray(self.options.allowedDomains) &&
self.options.allowedDomains.length > 0
) {
window.atatus.setAllowedDomains(self.options.allowedDomains);
}
// if (
// Array.isArray(self.options.allowedDomains) &&
// self.options.allowedDomains.length > 0
// ) {
// window.atatus.setAllowedDomains(self.options.allowedDomains);
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this code altogether, or is there a chance it will be needed in the future?

Copy link
Contributor Author

@fizerkhan fizerkhan Nov 24, 2022

Choose a reason for hiding this comment

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

Thanks.

I removed that allowed domains check.

@arielsilvestri
Copy link
Contributor

Hey @fizerkhan, could you merge in the latest master? I'll get this merged once that's all up to date.

@arielsilvestri arielsilvestri changed the base branch from master to atatus-new-feature-support December 6, 2022 17:14
@arielsilvestri arielsilvestri merged commit 3dbc38d into segmentio:atatus-new-feature-support Dec 6, 2022
arielsilvestri added a commit that referenced this pull request Dec 6, 2022
…nd other disable options (#705) (#717)

* Add support for version, whitelistUrls, ignoreUrls, ignoreErrors, and disable options

* Removed allowed domains option.

Co-authored-by: Fizer Khan <fizer@atatus.com>

Co-authored-by: Fizer Khan (பைசர் கான்) <fizerkhan@gmail.com>
Co-authored-by: Fizer Khan <fizer@atatus.com>
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.

2 participants