firebug/websocket-monitor

Filter frames

Opened this issue · 6 comments

Another feedback I've got says that it would be useful to filter the frame list and display only those that represents actual user messages. This would make easier to follow e.g. Socket IO traffic, which is constantly sending ping/pong frames.

Honza

@esphen What do you think?

Honza

@janodvarko

Yeah, it's been annoying me at work too. We send ping and pong frames once every 30 sec or so, even though we don't use Socket.IO :)

I think in some circumstances it would be useful to see the ping frames, i.e. when you're implementing the ping functionality. So we could say that the user can enable the ping frames with a pref in the addons panel.

What do ping frames in the different protocols look like? What should we hide?

At work we use simple frames that say ping or pong, so exact matches on those can be filtered out.

Are these 1B frames socket.io ping frames?

screenshot_20160304_215158

What about Sock.JS and WAMP? Do you know any conventions for pinging?

I can have a look at some way to implement this when I get time. This weekend maybe.

I think in some circumstances it would be useful to see the ping frames,

Definitely. I wasn't thinking about hiding these frames entirely, but rather provide a UI that allows the user to do that if wanted.

What do ping frames in the different protocols look like? What should we hide?

Of course, there can be many 'ping' messages, protocol based or custom like you have...

It's currently possible to filter frames using search box in the toolbar. Fox example, if you type tweet into it, only frames with tweat string in the payload will be displayed. Perhaps we could make this filter box smarter and allow to filter out frames that represents a 'ping' message.

I don't know about the syntax, but e.g. !ping would hide all frames with ping in the payload?
Or ! would hide frames with empty content? Are there any existing tools we could take an inspiration from. Does Wireshark have any standard syntax for filtering?

We might want to remember the filter in the UI (directly in the search box or in a recent filter list?) so, it's simple to set it again the next time.

Honza

@janodvarko

I don't know about the syntax, but e.g. !ping would hide all frames with ping in the payload?

Netmonitor uses something like this. They have a - syntax where you can write -ping to get anything that does not contain ping. We could do that to stay consistent with our sibling tools.

Does Wireshark have any standard syntax for filtering?

Yes, they got a brief introduction here. They use == with values on fields to confer equality, ! to negate expressions, and have predefined protocols like smb that only show samba traffic. It seems like a very intricate system, and albeit powerful, may be a bit overkill for us.

Or ! would hide frames with empty content?

I think !ping could hide both empty messages and ping, so the user wouldn't have to write something like !ping ! !pong which looks quite silly.

Speaking of which, should the user be allowed to enter several of these filters? How do we handle that? One suggestion is to use commas to separate expressions, i.e. !ping,!pong. Alternatively we can do what Wireshark does and use &&. Thoughts?

We might want to remember the filter in the UI (directly in the search box or in a recent filter list?)

Sure, we can do this with simple storage or similar. What is more interesting is how we would display them in the GUI. I was reminded of your suggestion in a different issue earlier to make a box like in the debugger panel. We could do something like that?

I drew a sketch of the idea. Please excuse the SUPER rough draft; I'm not a graphical designer 😄

sketch

Would be just nice to have an option in the settings for hiding ping-pong requests

Netmonitor uses something like this. They have a - syntax where you can write -ping to get anything that > does not contain ping. We could do that to stay consistent with our sibling tools.

I like the idea

I think !ping could hide both empty messages and ping, so the user wouldn't have to write something like
!ping ! !pong which looks quite silly.

Also agree

Speaking of which, should the user be allowed to enter several of these filters? How do we handle that?
One suggestion is to use commas to separate expressions, i.e. !ping,!pong.

Commas sounds good to me.

I also like the screenshot (with popup box). We can do it in a second step (also such UI could be reused in the Net panel).

Honza