aio-libs / aio-libs/aiohttp

tracing support enhancements

Đang mở
#3,084 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

## Long story short

After writing an ugly 2.x monkeypatch for client tracing support in datadog: https://github.com/DataDog/dd-trace-py/pull/294 a new aiohttp tracing strategy was discussed and created. I'm now trying to move this PR to use the new tracing support however have run into a few issues.

## Expected behaviour

Ability to trace major network activities in aiohttp

## Actual behaviour

1. Unable to trace when aiohttp is waiting for a request response headers: https://github.com/aio-libs/aiohttp/blob/v3.3.1/aiohttp/client.py#L387
2. Unable to trace chunked stream reads via `StreamReader.read()`

## Steps to reproduce

TBD

## Your environment

aiohttp 3.3.1

## Other Thoughts from a client perspective

1. Initially I thought a trace was missing for req.send: https://github.com/aio-libs/aiohttp/blob/v3.3.1/aiohttp/client.py#L385 however after tracing through that method and what it calls I don't think it needs to be an async function.
2. I think it would be a lot simpler if there was a trace per while loop of redirects, otherwise I have to piece together conn timeout + header send + header response
3. I'm not sure what `send_response_chunk_received` represents? It would be nice if there was a diagram describing when each one happens.
4. seems weird having `send_request_chunk_sent` w/o a received, basically sending request but never got response? What I see on a request from aiobotocore is: send_request_start -> send_conn_create_start -> send_conn_create_end -> send_request_chunk_sent -> send_request_end

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

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

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.