aio-libs / aio-libs/aiohttp

tracing support enhancements

オープン
#3,084 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
16.5k
フォーク
2.4k
平均マージ
17時間 22分
マージ済み PR(30日)
212

説明

## 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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。