Closed Bug 1335316 Opened 7 years ago Closed 6 years ago

Include URL parameters in network request logs

Categories

(DevTools :: Console, defect)

53 Branch
defect
Not set
normal

Tracking

(firefox60 verified)

VERIFIED FIXED
Firefox 60
Tracking Status
firefox60 --- verified

People

(Reporter: sebo, Assigned: abhinav.koppula, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(1 file, 2 obsolete files)

Network requests logged to the Web Console are missing URL parameters.
This requires a user to expand the requests or switch to the Network Monitor, if the same URL path is called with different parameters.

FWIW, in Firebug the URLs included the parameters and were truncated in case they are too long.

Sebastian
This feature may be optional (i.e. behind a preference) in case there are concerns that long URLs may cause UI issues.

Additional note about Firebug's implementation: It showed the full URL on hover.

Sebastian
Btw. this was asked for at http://stackoverflow.com/q/41945654/432681.

Sebastian
Instead of adding a preference for these things, I'd prefer if they were implemented naturally. A good solution would be doing better cropping (i.e. at the center), so we can have both the end, and the start of the URL. Or maybe a start cropping would be better.
Also, the new console gets rid of the long status code at the end which definitively helps.
(In reply to Tim Nguyen :ntim from comment #3)
> Instead of adding a preference for these things, I'd prefer if they were
> implemented naturally. A good solution would be doing better cropping (i.e.
> at the center), so we can have both the end, and the start of the URL. Or
> maybe a start cropping would be better.

Side note: Cropping in the middle of a string via CSS is not possible yet. See bug 740910.

Sebastian
I assume this shouldn't be too hard to implement, so I add the 'good-first-bug' keyword.

Sebastian
Keywords: good-first-bug
See Also: → 740910
Currently the query params are removed here
> request.url.replace(/\?.+/, "")
By simply removing the replace statement, the query params would be viewable, however long urls will be trimmed by the standard styling. Currently the expanded view of the line contains a params tab with any included params. While it is possible to have the beginning of the request truncated, this does not guarantee that all query params would be viewable.
Hi Sebastian,
Is this issue still open for anyone to take?
Flags: needinfo?(sebastianzartner)
I redirect that question to Robert, as he already started working on it (without being assigned).

Sebastian
Flags: needinfo?(sebastianzartner) → needinfo?(r.f.masen)
Abhinav,
  Feel free to work on this issue. I submitted my pull request 4 months ago and it hasen't been reviewed. I am not sure I understand how this whole process is supposed to work but I am not sure when I will have time again to figure it out.
Flags: needinfo?(r.f.masen)
Attachment #8906107 - Flags: review?(odvarko)
Attachment #8906111 - Flags: review?(odvarko)
Thank you for your answer, Robert! The normal process is to ask someone specific for review.
I think in this case it might be Honza, so I've set him as reviewer and mentor for this bug.
@Honza Please redirect the review if you can't review this patch.

Sebastian
Assignee: nobody → abhinav.koppula
Mentor: odvarko
Status: NEW → ASSIGNED
I like the idea of having URL params displayed by default.

Harald, what do you think?

Honza
Flags: needinfo?(hkirschner)
I like it as it is one of the essential information that makes up a request (URL, method & params)
Flags: needinfo?(hkirschner)
Comment on attachment 8906107 [details]
Bug 1335316

https://reviewboard.mozilla.org/r/177852/#review215706

Please rebase on the latest HEAD (the file has been renamed)

Thanks!
Honza
Attachment #8906107 - Flags: review?(odvarko) → review-
Comment on attachment 8906111 [details]
not sure how that line got deleted... Bug 1335316

https://reviewboard.mozilla.org/r/177860/#review215708

Please merge this patch into the first one.
Honza
Attachment #8906111 - Flags: review?(odvarko) → review-
Abhinav, are you still interested in finishing up the patch for this?

Sebastian
Flags: needinfo?(abhinav.koppula)
Hi Sebastian,
Sorry for the delay. Have rebased the patch.
Flags: needinfo?(abhinav.koppula)
Comment on attachment 8944033 [details]
Bug 1335316 - Include URL parameters in network request logs;

https://reviewboard.mozilla.org/r/214356/#review220154

Thanks!

R+ assuming try is green

Honza
Attachment #8944033 - Flags: review?(odvarko) → review+
Keywords: checkin-needed
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d74298d2f241
Include URL parameters in network request logs; r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d74298d2f241
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
I Have tried to Reproduce the Same Bug in Firefox Nightly  60.0a1 on Windows 10 (64bit) & Windows 7 (32bit)

------------------------------------------------------------------------------------------
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180212100154
Firefox Version: 60.0a1
------------------------------------------------------------------------------------------
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180211220056
Firefox Version: 60.0a1
------------------------------------------------------------------------------------------

But the Bug has been Fixed. 

[Steps to Reproduce]

1) Started the Firefox with Cleaned Profile
2) Then opened this URL https://bugzilla.mozilla.org/show_bug.cgi?id=1335316 in a New tab or Try any other URLs too.
3) Press the Ctrl+Shift+E for Network Monitor 
4) To Perform a request or "Reload" the same page to see detailed information about network activity.

Actual Results:
URL parameters Displayed in the requests logged to the console.

Status: Fixed & Verified 

[bugday-20180214]
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: