A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/getsentry/sentry-unity/issues/737 below:

Spans for HTTP requests - `UnityWebRequest` and `HttpMessageHandler` · Issue #737 · getsentry/sentry-unity · GitHub

When a user makes an HTTP request to their backend, we want to measure how long that took. And propagate the trace id so we can have end to end tracing.

This can be split in:

HttpMessageHandler

The .NET approach. Used in Sentry Defenses:
https://github.com/getsentry/sentry-defenses/blob/2989949f857f1cccb46814ce0a05d50f603f9222/game/Assets/Scripts/Manager/BugSpawner.cs#L37

We need to find a way add the handler automatically. At least on the one assembly created by Unity when compiling the scripts.

Steps:

UnityWebRequests (Unity Client)

Example HTTP client usage:

var www = new UnityWebRequest { url = message.RequestUri.ToString(), method = message.Method.Method.ToUpperInvariant(), uploadHandler = new UploadHandlerRaw(contentMemoryStream.ToArray()), downloadHandler = new DownloadHandlerBuffer() };

We need a way to plug Sentry in there. First 'manually' with some C# code. Then automatically, possibly with IL weaving.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4