Skip to main content

🌏 Network logs

Gleap allows you to log all network requests, to get a better understanding of what went wrong. This usually works out of the box and can be enabled within our visual widget configurator.

![Netowork logs within the Visual Widget Configurator](./img/Bildschirmfoto 2021-12-14 um 10.47.18.png)

Filtering network logs

Gleap allows you to strip off specific key/value pairs from network logs. This empowers you to easily remove sensitive data like tokens, passwords or usernames.

How does it work?

Log in to the Gleap dashboard and open the visual widget configurator. Now enable the network log filters option (within the advanced options tab). Once the option is enabled, you can add multiple keys to the array bellow, which should be excluded.

All keys, which you add to the exclusion list, will be loaded together with the widget configuration. Before sending a feedback item to our backend, the client SDK will loop through all network requests and stripe off all matching key/value pairs from the request headers, header-payload (if it's a JSON) and response body (if it's a JSON).

This ensures that sensitive information will never even leave the client application.

Example:

If you want to remove the Authorization bearer token from your requests, simply add "Authorization" to the list of keys.

Network log filters

Set filter with code

It's also possible to set the network log filters by code.

// Manually set the network logs filters
cordova.plugins.GleapPlugin.setNetworkLogPropsToIgnore(["api-key", "user.password", "..."])

Blacklisting URLs

It is possible to blacklist URLs or parts of URLs. If a network request matches one of the entries in the blacklist, the network request won't be included in the network logs.

To add a new entry to the blacklist, simply navigate to your project in the Gleap dashboard and open the visual widget configurator. Now click on Developer options and add the desired URLs.

Set blacklist with code

It's also possible to set the network log blacklist by code.

// Manually set the network logs blacklist
cordova.plugins.GleapPlugin.setNetworkLogsBlacklist(["https://api.gleap.io", "..."])