Gleap allows you to monitor network requests for a better understanding of what's happening within your app.
Configure network logs
Managed .NET has no global HTTP interception, so — unlike the native SDKs — only traffic routed through a Gleap handler is captured. Add the handler returned by CreateNetworkLoggingHandler() to the HttpClient instances you want to monitor. backend is the ManagedBackend returned by the platform attach call (for Windows: GleapMessenger.Backend).
using var http = new HttpClient(backend.CreateNetworkLoggingHandler());
await http.GetAsync("https://example.com");You can toggle capture at runtime:
Gleap.StartNetworkLogging();
Gleap.StopNetworkLogging();Filtering network logs
Gleap allows you to strip specific key/value pairs from network logs. This lets you remove sensitive data like tokens, passwords or usernames before anything leaves the client.
In Settings → Developer → Developer options → Network logs, configure Ignored keys and Excluded domains. Before a report leaves the device, the SDK removes matching keys from captured headers and JSON data. Authorization and cookie headers are always masked.
Set filter with code
// Manually set the network log filters.
Gleap.SetNetworkLogPropsToIgnore(new[] { "api-key", "user.password" });Blacklisting URLs
If a network request matches an entry in the blacklist, it won't be included in the network logs. You can maintain the list in the dashboard under Developer options, or set it by code.
// Manually set the network log blacklist.
Gleap.SetNetworkLogsBlacklist(new[] { "https://api.gleap.io" });
