Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP request profiling should surface body information #42952

Closed
bkonyi opened this issue Aug 5, 2020 · 3 comments
Closed

HTTP request profiling should surface body information #42952

bkonyi opened this issue Aug 5, 2020 · 3 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-_http

Comments

@bkonyi
Copy link
Contributor

bkonyi commented Aug 5, 2020

The HTTP request profiling code currently surfaces request/response metadata and headers via the timeline. We'd also like to be able to surface the body of the request/response in some fashion.

@bkonyi bkonyi added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-_http labels Aug 5, 2020
@bkonyi
Copy link
Contributor Author

bkonyi commented Aug 5, 2020

@zichangg I'm a bit bogged down with other work right now, think you can take this on for me?

@zichangg
Copy link
Contributor

zichangg commented Aug 5, 2020

sure thing!

@a-siva a-siva added this to the September 2020 milestone Aug 6, 2020
@BytesZero
Copy link

Hope to see the response data, this is a very urgent need.

dart-bot pushed a commit that referenced this issue Aug 17, 2020
Capture content of request/response.

Changes about this cl:
1. The body of request will be written used by methods of `IOSink`. Each
operation will emit a single event on the same timeline task. Add() will
accept List<int> and write() works with strings. The data will remain
the same as what user has passed. With that being said, data coming from
add() will show a list of integers and a string representation if
write() is used.

2. The timeline of `HttpClientResponse` will be a child timeline of
corresponding `HttpClientRequest`. It will be recorded only if parent
request is recorded and logging flag is still set. If the flag is on
after the request is sent, the response will not be monitored.

3. `HttpClientResponse` is simply a stream. The timeline starts when
the response is received. But it is possible that users doesn't
read the content and close the program. In this case, timeline never
gets a proper close event. To have a close event, users has to call
listen().

4. This also fixes verify_http_time_line_test.dart. It was broken
and not checking correct events because of a typo.

Bug: #42952
Change-Id: I884db6405264a3ad9a03cecc8f5445dad4fb3e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157567
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-_http
Projects
None yet
Development

No branches or pull requests

4 participants