segment-integrations / analytics.js-integration-sentry

The Sentry analytics.js integration.
https://segment.com/docs/integrations/sentry/
MIT License
3 stars 7 forks source link

add config options and respect RavenConfig #3

Closed sperand-io closed 9 years ago

sperand-io commented 9 years ago

This PR adds support for a few new settings via the UI:

http://raven-js.readthedocs.org/en/latest/config/index.html

Here's the way window.RavenConfig is used in initializing the lib — https://github.com/getsentry/raven-js/blob/master/src/raven.js#L849-L852. All of the options I've added belong in that RavenConfig.config sub-object.

As discussed, this implementation is completely deferent to the existing window.RavenConfig, copying over any properties from the UI-entered settings only when they're undefined on the existing window.RavenConfig.config. The reasoning here was that since we don't have a rule engine for when to apply settings (they're blanketed across your whole project), that we should totally respect the RavenConfig variable as the user's page-specific "escape hatch" settings-wise.

Where I still need a hand / extra-careful review:

Obviously, status is DO NOT MERGE until we update metadata accordingly.

@ndhoule @f2prateek

sperand-io commented 9 years ago

do we need to validate the regexps? if not, we at least need to wrap the regexp constructor in a try catch, i think