Adding an option to add HTTP request duration information

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
networking

Hướng nghiên cứu

Bắt đầu trong google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java, tại phần ghi log gỡ lỗi được tham chiếu gần dòng 890, rồi theo dõi vòng đời của request và tùy chọn ghi log hiện có. Công việc được xem là hoàn tất khi đầu ra gỡ lỗi opt-in bao gồm thời lượng của HTTP request, đồng thời giữ nguyên các chi tiết hiện có của request và response.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type: feature request

Is your feature request related to a problem? Please describe.
We have the need of getting the HTTP request duration of the remote calls that have been involved within HTTP calls that uses this SDK.

The library already provides an option to enable the debug logging where we can get the full HTTP request and response: https://github.com/googleapis/google-http-java-client/blob/4e3b3c3cebeb8439e729a9f99b58e5fc5e13e2cf/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#L890

However there is no information about how long the request happened.
Do you have any plan to add the option to add this information when the debug logs is enabled ?

Describe the solution you'd like
An option to show HTTP request duration while enabling debug logging mode.

Describe alternatives you've considered
We added another listener to calculate the request duration and print it as a separate logs, which makes it harder to correlate the request duration with the rest of other information while debugging if a lot of HTTP requests are executed in parallel.

Additional context
N/A

Ngôn ngữ chính
Java
Star
1.4k
Fork
476
Merge trung bình
10 giờ 47 phút
Pull request đã merge (30 ngày)
3

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 googleapis/google-http-java-client

Tất cả issue của googleapis/google-http-java-client

Issue tương tự

Thêm issue về Java

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.