Removing sensitive data

You can filter out sensitive information from error data, meaning before errors are sent to Raygun. This enables you to remove sensitive data such as credit card details when sending errors from your application.


If you are concerned about sending information to Raygun that is deemed sensitive, you can find information in our documentation per each programming language on how to control this.

Developers are in full control of what they send to Raygun and just need to configure this in your app.

Read more in this post or view the documentation in the language guides around sensitive data.

tip: For example, here's how to do this in JavaScript.

For filtering other sensitive information, you should be able to use the 'ignoreHeaderField' for the CLIENT-IP and the X-Forwarded-For fields either by changing your config file or using the matching methods on the raygunClient and passing the matching keys. For example: CLIENT-IP.

Otherwise you can modify the payload and thus remove the matching fields by attaching an event handler to the 'SendingMessage' handler. Here's an example for how to do this in .NET.


For other Personally Identifiable Information (PII) such as IP addresses, this can also be disabled.

To stop the storage of IP addresses you can go to your "Application settings" page in Raygun and then enabling the "Disable IP address storage" flag.

disable IP address collection


Further help

If you have further questions or need help setting Raygun up around sensitive data, we are more than happy to help. We find the large majority of teams who think they cannot use a tool like Raygun due to data restrictions, are able to with the right set up and practices.

Contact us for help with this via our support page