-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implemented AnonymizeQueryStringValues option (proposal 1 from #927). #1171
Implemented AnonymizeQueryStringValues option (proposal 1 from #927). #1171
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #1171 +/- ##
=========================================
- Coverage 73.61% 73.6% -0.01%
=========================================
Files 144 144
Lines 10529 10534 +5
=========================================
+ Hits 7751 7754 +3
- Misses 2321 2322 +1
- Partials 457 458 +1
Continue to review full report at Codecov.
|
@marklagendijk , thanks for the PR! I quickly skimmed it just now and while I didn't spot any big issues with the code, but I'm sorry to say that we might delay actually merging this until we plan out some future k6 changes, or potentially not merge the PR at all 😞 . In particular, we recently decided that we'll create a brand new JS HTTP API to address all of the shortcomings with the current But whereas your PR adds a new global config option (which we are reluctant to do because of #883) for solving a part of that issue in a very specific way, we'd like to have something more flexible and unobtrusive. For example, here are some things that the current approach doesn't solve:
We still don't have a proper GitHub issue describing the new HTTP API that we'd like to build, since we only just had a long verbal discussion about how it should look like last week. When we create one, we'll link this PR and the original issue that prompted it. But as a sneak peek, one of the things we want in the new API is to have a user-customizable HTTP As I said, we still don't have the new API fully mapped out, but we're pretty sure that we would be able to fit all of these features in a very developer-friendly and natural way. Thanks again for the PR and sorry that we have to delay or not merge it, but please stay tuned for the new HTTP API, I'm hoping that you'd like it, since it should solve a lot of the issues with the current one, without actually being any more complicated to use at all for simple things. |
I did some quick benchmarking in order to see if a naive for loop will be much faster and .... it is:
But as @na-- pointed out we might not be merging this anytime soon or at all but I would still prefer if you did change to the not regexp version ... maybe try with strings.Index as well in the mean time |
@na-- although it will take some more time, I do really like the idea of having an improved HTTP module. A long time ago I created an issue about this #436. There are some concrete suggestions in there, based on the Node.js request library. I would highly recommend taking a good look at request, not only because it is a good library (it is), but also because it is very well known with Javascript developers. |
Closing this in favor of #436, #2461, and all of the other |
This pull requests implements proposal 1 from #927.
The AnonymizeQueryStringValues option is added, which when enabled anonymizes the query string values of the url sent to the
name
tag.Example:
https://my-url?name=value&name2=value2
=>https://my-url?name=[]&name2=[]