Spans for HTTP requests - `UnityWebRequest` and `HttpMessageHandler`

Đang mở
#737 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@bitsandfoxes đang làm issue này rồi.

Từ ngày 9/5/2022.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Improvement Traces Unity

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:

  • A PoC that gets a DLL that has new HttpClient(...) and adds the middleware (as done in Sentry defenses) @SimonCropp
  • Find out which Unity hooks can we rely on to get the GameAssembly.dll @bitsandfoxes
  • With the PoC we can discuss next steps such as: Is this a .NET Global Tool? Do we have the code in Sentry.Unity.Editor?

UnityWebRequests (Unity Client)

Example HTTP client usage: https://github.com/getsentry/sentry-unity/blob/7774137c35ce4a3653b934e15ed15f0078a2ee36/src/Sentry.Unity/UnityWebRequestTransport.cs#L75-L81
We need a way to plug Sentry in there. First 'manually' with some C# code. Then automatically, possibly with IL weaving.

  • We need a strategy to get spans/crumbs similar to SentryHttpMessageHandler @bitsandfoxes
  • PoC with IL weaving a DLL using UnityWebRequest and add the new interceptor @SimonCropp
  • With the PoC we can discuss next steps such as: Is this a .NET Global Tool? Do we have the code in Sentry.Unity.Editor?
Ngôn ngữ chính
C#
Star
294
Fork
63
Merge trung bình
3 ngày 17 giờ
Pull request đã merge (30 ngày)
26

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-unity

Tất cả issue của getsentry/sentry-unity

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.