-
Notifications
You must be signed in to change notification settings - Fork 185
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
Reuse http client #962
Reuse http client #962
Conversation
Welcome @aleksmaus! It looks like this is your first PR to falcosecurity/falcosidekick 🎉 |
Signed-off-by: Aleksandr Maus <[email protected]>
7cbd6f6
to
c5c5208
Compare
Signed-off-by: Aleksandr Maus <[email protected]>
9a7a03f
to
3a7bd98
Compare
Hi, This is an interesting PR, thanks. I can't review for now, I'm on a family road trip for 2 weeks. Will review when I'm back |
Thank you! Have a great trip! |
…s nil, err Signed-off-by: Aleksandr Maus <[email protected]>
b1670e6
to
856400f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems all good to me 👍
LGTM label has been added. Git tree hash: de419f827e62e07c36d901ac91486cb2cba4e26f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aleksmaus, Issif The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area outputs
What this PR does / why we need it:
This PR reuses http.Client instance for the outputs, were it was previously created per each request.
The http.Client reuse is recommended:
https://cs.opensource.google/go/go/+/refs/tags/go1.22.6:src/net/http/client.go;l=34
We are seeing 3-4x increase of throughput for Elasticsearch output in out tests.
I tried to keep the approach to the http client and the transport creation the same as before, namely logging and continuing on error, extracted some code into the function.