feat(data-collection): Port redis, net:http, faraday and excon - #3032
feat(data-collection): Port redis, net:http, faraday and excon#3032sl0thentr0py wants to merge 1 commit into
Conversation
0282f43 to
6affacd
Compare
6affacd to
b0dfd58
Compare
b0dfd58 to
eea5790
Compare
eea5790 to
10149e3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 10149e3. Configure here.
10149e3 to
0b2ef30
Compare
0b2ef30 to
c79d366
Compare
c79d366 to
a5b79c8
Compare
a5b79c8 to
28311d3
Compare
28311d3 to
8b35800
Compare
8b35800 to
3d58981
Compare
3d58981 to
da0a3e0
Compare
| def format_query(query) | ||
| query.flat_map do |key, value| | ||
| Array(value).map { |item| "#{key}=#{item}" } | ||
| end.join("&") | ||
| end |
There was a problem hiding this comment.
Bug: The new format_query method incorrectly serializes nested hash query parameters, which is a regression from the previous build_nested_query implementation.
Severity: MEDIUM
Suggested Fix
Update the format_query method to recursively handle nested hashes, converting them into the correct bracketed notation for URL query strings. This can be achieved by reintroducing logic similar to the removed build_nested_query function to restore the previous functionality.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: sentry-ruby/lib/sentry/utils/http_tracing.rb#L28-L32
Potential issue: The refactoring in `filter_query_params` introduced a new
`format_query` method that does not correctly handle nested hash structures for query
parameters. The previous implementation used `build_nested_query`, which supported this
functionality. If a user provides a nested hash as a query parameter (e.g., `{qux: {a:
1}}`), the new logic will incorrectly serialize it to a string like `"qux=[:a=>1]"`
instead of the expected `"qux[a]=1"`. This is a regression that can lead to malformed
HTTP requests for integrations like Excon when complex query parameters are used.

Makes url collection close to the table here. Note that we haven't renamed
urltourl.fullyet, that will be done in the major.Issues