Configuration
=============
We must first configure Sentry to allow certain hosts to report errors. This prevents abuse so somebody else couldn't start sending errors to your account from their site.
**Note**: Without setting this, all messages will be rejected!
This can be found under the *Project Details* page in Sentry.
.. image:: https://i.imgur.com/S09MeSM.png
Now need to set up Raven.js to use your Sentry DSN.
.. code-block:: javascript
Raven.config('https://public@getsentry.com/1').install()
At this point, Raven is ready to capture any uncaught exception.
Although, this technically works, this is not going to yield the greatest results. It's highly recommended to next check out :doc:`/usage/index`.
Optional settings
~~~~~~~~~~~~~~~~~
``Raven.config()`` can be passed an optional object for extra configuration.
logger
------
The name of the logger used by Sentry. Default: ``javascript``
.. code-block:: javascript
{
logger: 'javascript'
}
release
-------
Track the version of your application in Sentry.
.. code-block:: javascript
{
release: '721e41770371db95eee98ca2707686226b993eda'
}
Can also be defined with ``Raven.setReleaseContext('721e41770371db95eee98ca2707686226b993eda')``.
.. _config-whitelist-urls:
tags
----
Additional `tags `__ to assign to each event.
.. code-block:: javascript
{
tags: {git_commit: 'c0deb10c4'}
}
whitelistUrls
-------------
The inverse of ``ignoreUrls``. Only report errors from whole urls matching a regex pattern or an exact string. ``whitelistUrls`` should match the url of your actual JavaScript files. It should match the url of your site if and only if you are inlining code inside ``