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:
HttpMessageHandlerThe .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:
new HttpClient(...)
and adds the middleware (as done in Sentry defenses) @SimonCroppGameAssembly.dll
@bitsandfoxesSentry.Unity.Editor?
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.
UnityWebRequest
and add the new interceptor @SimonCroppSentry.Unity.Editor?
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