question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filter Transaction list based on Request Body contents

See original GitHub issue

⚠️ Is your feature request related to a problem? Please describe

We are using Chucker to inspect our https requests & responses and that also includes GraphQL. But due to the diverse and numerous modules in our application making network requests, the transaction list can sometimes become huge. Filtering on the basis of the URL doesn’t help because the endpoints for all the GraphQL requests are just the same(because all our GraphQL requests are POST requests).
Filtering the transaction list on the basis of the request body content would be extremely helpful to filter specific transactions not limited to just GraphQL.

💡 Describe the solution you’d like

A very naive solution, without requiring any UI change, would be to update the SQL query in the HttpTransactionDao’s getFilteredTuples() function to search the user entered text in the request body as well. Eventually updating the query to:-

 "SELECT id, requestDate, tookMs, protocol, method, host, " +
            "path, scheme, responseCode, requestPayloadSize, responsePayloadSize, error, isGraphQLRequest FROM " +
            "transactions WHERE responseCode LIKE :codeQuery AND (path LIKE :query " +
            " OR requestBody LIKE :query) ORDER BY requestDate DESC"

📊 Describe alternatives you’ve considered

Nothing so far.

📄 Additional context

chucker_filter_based_request_body

🙋 Do you want to develop this feature yourself?

  • Yes
  • No

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
cortinicocommented, Jul 30, 2022

Filtering the transaction list on the basis of the request body content would be extremely helpful to filter specific transactions not limited to just GraphQL.

I’m afraid this feature will actually have unwanted side effects. Specifically:

  1. You might end up not really filtering the list. As we widen the search surface, the result list can increase and reduce the effectiveness of the filter.
  2. Users might not really understand why a certain transaction is shown. HTTP Body can be really complex, with both request and response, so users won’t really know why a certain transaction is show, till they effectively open it and look through the bodies.

I see your use case though, so I’m not totally against this. I think we should consider it somehow, but I’d like to collect more opinions on this.

1reaction
cortinicocommented, Dec 9, 2022

What sort of timeline are we looking at for the next release?

Whenever we have time 😦 I’m extremely busy at the moment. We’re looking for other maintainers also 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filtering Requests and Responses - The Java EE 5 Tutorial
A filter is an object that can transform the header and content (or both) of a request or response. Filters differ from web...
Read more >
How to modify request body before reaching controller in ...
In your Filter, instantiate your wrapper class and pass in the original request (which is a parameter to the doFilter method). Pass the...
Read more >
Content filtering filters - Axway Documentation Portal
Commonly used filters for filtering and validating messages based on their content. Includes query string validation, HTTP header validation, and JSON schema ...
Read more >
Request and response API transaction - NetApp
This request/response pair is considered an API transaction. ... The content of the request body varies depending on the specific call.
Read more >
Configure Request Filtering in IIS - Microsoft Learn
Maximum length of the content requested. Maximum length of the URL. Maximum size of a query string. To configure general request-filter options ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found